Solved

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

Posted on 2010-08-19
3
404 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
Comment Utility
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
Comment Utility
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
Comment Utility
Makes sense - the strings needs to be quoted. Sorry about that.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe INTRODUCTION This Article is a follow-up to the Article entitled How To Rename-Move a Batch of PDF Files Based o…
PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
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…
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now