Expand my Community achievements bar.

Getting a field value from the first page on the second page in HTML

Avatar

Former Community Member
I have a 2 page form I'm presenting in HTML to the user. The first page they select an action, enter a USERID and click the next page button. (The button executes "xfa.host.pageDown();" on the click action at the server)



On the initialize of the second page I try to get the value of the USERID field from the first page and create a SQL statement to open my data connection. The issue I have is that I cannot get the value of the USERID field. This code works cause if I hardcode a valid value the query works. I tried to work around this by putting the same field on page 2, but it still did not work but the field was populated with displayed. I only assume the data is not populated at the time the initialize is invoked.



Here is my code on the initialize..

xfa.sourceSet.nodes.item(0).resolveNode("#command.query").commandType = "text"



xfa.sourceSet.nodes.item(0).resolveNode("#command.query").select.nodes.item(0).value = "Select * from TABLE where userid = '" + xfa.form.resolveNode("form1.Page1.txt_EmployeeLogin").rawValue + "'"



xfa.sourceSet.DataConnetion.open()



Any help is greatly appreciated.



THANKS!!
1 Reply

Avatar

Level 6
Hi Steve,



If you haven't already done so, I recommend posting this question in the LivCycle Forms forum.



Jared