Link to home
Start Free TrialLog in
Avatar of shrihalbe
shrihalbe

asked on

Query_string is not captured

Hello
in web enabled database one documet is composed and it has querystring field (which is key for document)capturing from previous form value.

it has one button that is used to send mail.

so in background agent i am trying to  capture the querystring field to get exact document from database. and send contents of that docuemnt to the fixed usr.

but my problem is if i hide the field query_string on the form then agnet cannot be ableto capture that field value.

is there any workaround

any help would be appreciated.

thanks,
shrirang
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

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 HemanthaKumar
HemanthaKumar

Use "Generate HTML for all fields" in the default tab of the form property dialog


Hello shrihalbe,

to capture Query_String or Query_String_Decoded you need a second field where you have to copy the CGI field to be stored for later processing.

For example, make a new field named LastQueryString, make it Computed and place this formula in its Value formula:
FIELD Query_String:=Query_String;
FIELD LastQueryString:=LastQueryString;
@If(Query_String="";"";Query_String)

Sorry, correct Value formula for field LastQueryString is:
FIELD Query_String:=Query_String;
FIELD LastQueryString:=LastQueryString;
@If(Query_String="";LastQueryString;Query_String)

Yes, the Query_String property in the DocumentContext document used in the agent refers to the Query String used to start the agent IIRC.
Not only to start the agent but any URL having a question mark in it, provide at request time (again: at REQUEST time) the Query_String CGI variable.

To get this CGI variable it is not necessary to have the html code for the field. It is only necessary to have a field present on the form with the name Query_String to be able to fetch the CGI value and compute other fields with its value.
For direct agent calls it is of course not possible and not necessary to define the field but still possible to obtain it's value from: doc.Query_String(0)

Avatar of shrihalbe

ASKER

THanks Hemnath

Shri
Anytime.