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
BedrockMission!

Learn More

View all

Sign in to view all badges

Initializing javascript values into dropdown list in web forms

Avatar

Avatar
Validate 1
Level 2
jitendrat766521
Level 2

Likes

2 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
jitendrat766521
Level 2

Likes

2 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
jitendrat766521
Level 2

04-06-2018

Hi Team,

I am facing some challenge on calling java script values into next page drop down list  so please provide me the solution on this ASAP.

This is my script:

var query = xtk.queryDef.create(

<queryDef label="Campaigns" namespace="nms" operation="select"

          schema="nms:operation" startPath="/" xtkschema="xtk:queryDef">

      <select>

    <node   expr="@label" />

  </select>

</queryDef>

)

var res = query.ExecuteQuery(); 

if (ctx.vars.length() == 0) {

  ctx.appendChild(<vars/>)

 

 

ctx.vars.appendChild(res);

2)This is my web form flow

1501471_pastedImage_4.png

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

05-06-2018

Hi Jitendrat,

Please may you check the context content (for vars elements) by selecting the Debug checkbox in the Preview tab?

Take care, you must retrieve 2 nodes, not only the label but the ID or internal name.

And in the web page activity section, if it is a web page compatibility v5, you must set the listbox in the Advanced tab.

Whatever you need to use a list box value dynamically set from your database, custom or standard tables values, you can set the XPath it as is in the Advanced tab of the Web page form (compatibility v5):

1502304_pastedImage_3.png

If the activity web page is a Web page v6 (standard one, not a compatibility v5 one), you can manage the values in the source page directly doing your queryDef in Javascript and assigning values to the <input select...> element values.

Regards
J-Serge

Answers (0)