Hi,

   <!-- get region from user's country -->

Data in XML file

    <rde-dm:include tag="myconfig" content="myxmlfile.xml" rde-
id="config-approval"/>

    <rde-dm:attribute mode="write" attribute="request:region"
value="[#xpath:rde-node('myconfig')//countries/country
[...@name='[#user:profile.country#]']/@region#]"/>


>From Database

<! GET MYCOMPANY -->

        <rde-dm:rdb mode="query" alias="yourdb" sql="Select * from
mytable  WHERE filter=1 AND REQUEST_KEY=[#request:request_id#]" rde-
id="resultset" report-tag="hidden"/>
        <rde-dm:attribute mode="write" attribute="company"
source="request" op="add" value="[#xpath:rde-node('resultset')//
MYCOMPANY/text()#???#]" value-separator=";"/>


Hope this helps.

thanks,
Baliyan



On Feb 18, 5:34 pm, Inf Red <[email protected]> wrote:
> Hi Baliyan,
>
> Thanks for your response. but, I want to store the value in the
> session.
>
> I modified it little bit, but, it still not getting the value I'm
> expecting.
>
> <dynaments>
> <rde-dm:rdb mode="query" alias="SQL" sql="select user_id from users
> where user_name='test'" tag="user" rde-id="01" result-attribute
> ="return-code"/>
> <rde-dm:attribute mode="condition" source="request" attribute="return-
> code" op="eq" value="0">
>   <rde-dm:if>
>       <rde-dm:attribute mode="write" attribute="session:userid"
> op="set" value="[#xpath:rde-node('01')//user/row/user_id#]"/
>
>   </rde-dm:if>
> </rde-dm:attribute>
> </dynaments>
>
> Some issue with the Xpath. Can anybody give me a simple example of
> using Xpath in dynaments to assign value to attributes.
>
> Thanks
> Ramana
>
> On Feb 17, 1:55 pm, "[email protected]" <[email protected]> wrote:
>
> > Hi Ramana,
>
> > What is name of the attribute userid ?   You can try using user:userid
>
> > Regards,
> > Baliyan
>
> > On Feb 17, 1:40 am, Inf Red <[email protected]> wrote:
>
> > > Hi,
>
> > > I'm not sure what's missing here, but the value is not being stored in
> > > the session.
>
> > > <dynaments>
> > > <rde-dm:rdb mode="query" alias="SQL" sql="select user_id from users
> > > where user_name='test' tag="user"
> > > rde-id="01" process-mode="execute"/>
> > > <rde-dm:atribute mode="write" name="session:userid" value="[#xpath:rde-
> > > node('01')  //user-id#0#]" />
> > > </dynaments>
>
> > > Any help?
>
> > > Thanks
> > > Ramana- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RedDot-CMS-Users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to