Solved

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

Posted on 2010-08-19
3
407 Views
Last Modified: 2012-05-10
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?
0
Comment
Question by:Sivasan
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 33484149
You can access the value of a text field with the following FormCalc construct:

TextField1.rawValue

If you want to assign this value to another text field, you would use something like this:

TextField2.rawValue = TextField1.rawValue

In your case, you would just something like
$sourceSet.DataConnection.#command.query.select.nodes.item(0).value= Concat("Select * from performview Where Empno = ", TextField1.rawValue)
0
 

Author Comment

by:Sivasan
ID: 33505000
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, " ' ")
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 33505146
Makes sense - the strings needs to be quoted. Sorry about that.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe A recent question here at Experts Exchange piqued my interest, so I decided to provide a thorough solution and publ…
Have you ever come up with a need of emailing only few pages of PDF file to one of yourfriend or colleague, instead of whole Adobe file? If yes, then surely you have face problems in doing that! Read this section as I have suggested multiple solutio…
In this second video of the Xpdf series, we discuss and demonstrate the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). Download and inst…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question