Link to home
Start Free TrialLog in
Avatar of Sivasan
SivasanFlag for United States of America

asked on

How to use Textfield instead of drop down for input to populate the pdf using livecylce es2

Hi There


I was finally able to populate the field by hard coding the where to clause

 

form1.#subform[0].Button1::click - (FormCalc, client)
$sourceSet.DataConnection.#command.query.commandType= "text"
$sourceSet.DataConnection.#command.query.select.nodes.item(0).value= Concat("Select * from performview Where Empno = ", 10 ,"")
$sourceSet.DataConnection.open()

 
I want to use a textfield where the user of the form will enter the empno which will be applied to the query. I have only seen example for drop down list intialize, I don't want to use drop down list as it take a long time when we open the pdf as our table that drop down list uses is big and it times out.
So i want to use the input from a textfield where user's enter the number for Empno field and I use that to do the query how would I do this?

 
so I want to pass $sourceSet.DataConnection.#command.query.select.nodes.item(0).value = Concat("Select * from performview Where Empno = ", This should be from the textfield selectfield ,"")

 
So how do I initialze a textfield to do this?
ASKER CERTIFIED SOLUTION
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sivasan

ASKER

Hi Thanks for the response.
This is the one that worked had to have ' ",   ," ' ".
$sourceSet.DataConnection.#command.query.select.nodes.item(0).value= Concat("Select * from performview Where Empno = ' ", TextField1.rawValue, " ' ")
Makes sense - the strings needs to be quoted. Sorry about that.