You are viewing limited content. For full access, please sign in.

Question

Question

Passing variable from Form 1 to Form 2 and back

asked on March 11, 2016

So here's what we're trying to accomplish.

We currently have a form that submits to a third-party test site for payment (this is done by means of passing the variables to a Web page, and having this Web page URL as the page to load upon completion of Form #1).  From there, it takes the submitted information, processes it, and returns the Transaction Status, as well as the Transaction Date.  From there, this information is parsed out of the URL and used to populate a second form (Form #2).  

So what we're trying to do is take the Transaction Status and Date, and pass these from Form #2 (pre-loaded with the transaction information coming back from the payment company) and pass it back to the original form as variables, which could be used later.

To this point, I have written a workflow that will kick off when Form #1 is completed.  From there, I've tried the Set Business Process Variables function to pass values back to Form #1, and I can see (via Track Tokens) that the value is passing, but looking at the original form instance, the variable never gets back (even with trying a delay, a subprocess, a delay before going to the subprocess, etc.).

When I use the Invoke Business Process function, it passes the value back to Form #1, but as you probably guessed, a separate instance of Form #1 runs instead.  

So I guess what I'm wondering is, how can I ensure the values being passed from Form #2 back to Form #1 (through the workflow) will end up as a variable that can be used later in the original Form (Business Process)?  Or is the workflow idea the wrong way of thinking for passing values between these two forms?

Thanks to anyone who chooses to tackle this - much appreciated!


Marty Gaffney - Network Technician

Town of Okotoks

@lfguy

1 0

Answer

SELECTED ANSWER
replied on March 14, 2016

Hi Marty, 

 

I think the best way to do this is by saving the Variable information which you would like to use in SQL table, then when the workflow kicks off, the information will be there and then build into your Form to fetch the data when needed and fill in the SQL data into the Form.

0 0

Replies

replied on March 14, 2016

So that works for me, and I can pull query results into a form, but I'm wondering why this doesn't work for variables being passed back to a form from a completed workflow?

0 0
replied on March 14, 2016

Is Forms 1 and Form 2 in the same business process?

0 0
replied on March 14, 2016

No, because we were trying to pass variables back from a separate process (and didn't think you could pre-populate a different form in the same process).  If this is possible, I'd be interested to know how! :)

0 0
replied on March 14, 2016 Show version history

Hi there,

In a business process, a form is just a display view, when workflow set business process variable, it update the business process field variables, independent of any specific form.

0 0
replied on March 14, 2016

That's what I thought too...

My workflow first took values and exported them as business process variables (and I verified them to be correct via Track Tokens), but when I went to reference them back in my primary form, nothing was passed back - it seemed to work when I launched a form instance from Workflow, but not when I passed variables back. surprise

0 0
replied on December 14, 2021

Anyone ever figure out how to pass variables to a URL when the variable contains the & symbol? That symbol separates the variables so it is throwing me off. Thanks!

0 0
replied on December 14, 2021

Have you tried using the percent-encoded equivalent (i.e. replacing "&" with "%26")?

1 0
replied on December 15, 2021

that worked, thank you!!

1 0
replied on October 12, 2023

Hey everyone! Any tips on passing the variable from a table to a URL to auto fill the field? Thanks!

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.