Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How do we access the variable from Previous page5 activity in to script ?

Prasanna_Soni
Level 4
Level 4

I am trying to accept the email as text input field and once i accept that need to verify if record exists in recipient. if exists , then get id and preload the webapp with that id. if email does not exisits then give url without id. 

 

So i created MEmail as variable in page text inlut activity, and accepting the email. Now in next activity i defined Script and in code i am calling that variable 

<condition expr="@email=ctx.vars.@MEmail"/> , but its not executing. Seems I am calling wrong way that variable ? any help ? 

 

var query = xtk.queryDef.create(
<queryDef schema="nms:recipient" operation="getIfExists">
<select>
<node expr="@email"/>
<node expr="@id"/>
</select>
<where>
<condition expr="@email=ctx.vars.@MEmail"/>
</where>
</queryDef>
)


var res = query.ExecuteQuery()

1 Accepted Solution
Amit_Shinde
Correct answer by
Level 3
Level 3

Hi @Prasanna_Soni,

 

Please use the below condition.

 

<condition expr={"@email='"+ctx.vars.MEmail+"'"}/>

 

Thanks,

Amit

View solution in original post

1 Reply
Amit_Shinde
Correct answer by
Level 3
Level 3

Hi @Prasanna_Soni,

 

Please use the below condition.

 

<condition expr={"@email='"+ctx.vars.MEmail+"'"}/>

 

Thanks,

Amit

View solution in original post