Focal Point
Redirect after running focexec

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6701091432

June 25, 2007, 12:59 PM
atc12345
Redirect after running focexec
I'm trying to capture the results of my focexec for use in an ASP.net procedure. I'm not sure of the syntax or how it can be done. For example:


TABLE FILE CAR

BY CAR

IF CAR EQ 'TOYOTA'

ON TABLE SAVE AS FILE1

END

-RUN


-READ FILE1 &THECAR.A10.


-**Would like to take results of focexec to my .Net page


<%

response.redirect "https://MyURLGoesHere.aspx&THECAR="&(THECAR)&""

%>

June 25, 2007, 01:11 PM
Alan B
I would use:
TABLE FILE CAR
BY CAR
IF CAR EQ 'TOYOTA'
ON TABLE SAVE AS FILE1
END
-RUN
-READ FILE1 &THECAR.A10.
-HTMLFORM BEGIN
<html>
<script>
location.href="https://MyURLGoesHere.aspx?THECAR=!IBI.AMP.THECAR;"
</script>
</html>
-HTMLFORM END


And don't forget a default action if there are no records.


Alan.
WF 7.705/8.007
June 25, 2007, 01:45 PM
atc12345
Thanks Alan. I will test and let you know the results. Incidentally, if I had more than one variable to pass to the .NET program would the syntax be:


location.href="https://MyURLGoesHere.aspx?VAR1=!IBI.AMP.VAR1?VAR2=!IBI.AMP.VAR2;"
June 25, 2007, 01:48 PM
Alan B
Exactly. But don't forget the semi-colon after VAR1! A variable comes in as !IBI.AMP.variable; .


Alan.
WF 7.705/8.007
June 26, 2007, 11:25 AM
atc12345
Alan: The procedure seems to work fine with one variable being passed to the next page. However when I try to pass two variables:


I printed it out three ways:

-SET VAR1 = '12345';

-SET VAR2 = 'ABCDE';


A - location.href="https://MyURLGoesHere.aspx?VAR1=!IBI.AMP.VAR1;"

B - location.href="https://MyURLGoesHere.aspx?VAR2=!IBI.AMP.VAR2;"

C - location.href="https://MyURLGoesHere.aspx?VAR1=!IBI.AMP.VAR1;?VAR2=!IBI.AMP.VAR2;"

Option A and B print out fine, But option C prints out: 12345?VAR2=ABCDE


I can't seem to break out the second variable.
June 26, 2007, 05:17 PM
Alan B
Sorry

That's me being inattentive.

location.href="https://MyURLGoesHere.aspx?VAR1=!IBI.AMP.VAR1;&|VAR2=!IBI.AMP.VAR2;"

replacing the second ? with an &|.

The ? starts the string and the first name/value pair,and all subsequent name/value pairs are separated with the &. The concat because otherwise WF thinks its an &var. Then your request.querystring can pick up VAR1 and VAR2.

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
June 27, 2007, 08:39 AM
atc12345
Thanks Alan. It worked perfectly.