NJohann
Forms Fledgling

How to Parse out parameters from a URL into form fields?

I have a form that will be triggered from another site via a link which we will add to the URL some data points which we want to parse out and plug into fields on our form upon opening. The string added looks something like this: 

     DataIn=Company%20Owned|US%20OU%20USD%20TCS||9876543|||234567||||345678|||||CUSTOMER%NAME%...aspx

We currently do this via an InfoPath form using the below formulas for each field (see screen shot).

     substring-before(DataIn, "|")

     substring-before(substring-after(DataIn, "|"), "||")

     substring-before(substring-after(DataIn, "||"), "|||")

     

We want to do the same thing in a Nintex Form (using Responsive Designer) but are struggling with this. I'm assuming I'll need to create some kind of variable and saw a parse function but can't figure out the formula...HELP! Is that the right formula, how do I "convert" it...the length of the field inputs varies☺.

0 Kudos
Reply
5 Replies
SimonMuntz
Nintex Employee
Nintex Employee

Re: How to Parse out parameters from a URL into form fields?

Hi,

At the present time the only way to pass parameters to the URL in O365 is to use New Responsive Forms and the getQueryStringParameter function.

https://help.nintex.com/en-US/office365/Designer/Functions/getQueryStringParameter.htm
Reply
NJohann
Forms Fledgling

Re: How to Parse out parameters from a URL into form fields?

@ or anyone else...

Do the other forms do the type of parsing from my example? If so, is there a easy way to convert what I have built?

 

I need some type of solution or I have to scrap all the work I've done which will be incredibly disappointing.

0 Kudos
Reply
cecilia-penha
Nintex Employee
Nintex Employee

Re: How to Parse out parameters from a URL into form fields?

Hi @NJohann ,

 

@SimonMuntz provided the easy way to achieve that using the New Responsive Form with the inline function. 

Using the Responsive Form, there's no inline function. No Javascript.

Using the Classic Form, you can use JavaScript to achieve that. 

 

^^

0 Kudos
Reply
NJohann
Forms Fledgling

Re: How to Parse out parameters from a URL into form fields?

@cecilia-penha I don't think his recommendation works b/c it appears that solution requires fixed location in the string which I do not have (unless I just don't fully understand how it works?). 

 

Is there a way to transfer everything I've done in a Responsive form to a Classic form w/o rebuilding the whole form? I have done a lot of work in my Responsive form including a BUNCH of rules, if I have to start from scratch manually it's going to set me back in a big way that isn't acceptable to my project. 

0 Kudos
Reply
cecilia-penha
Nintex Employee
Nintex Employee

Re: How to Parse out parameters from a URL into form fields?

@NJohann ,

 

Using the New Responsive Form, you will only be able to get the parameter value by the Name. There's no split function or substring search on a value.  I would recommend : 

instead passing  ?DataIn=CompanyValue|OperatingUnitValue|...

passing ?Company=Value&OperatingUnit=Value

This is the proper way. 

Plus, you have to ensure your parameter is properly encoded. The value you provided is not. I hade to remove the "%Name%".

 

As per as I know, there's no way to transfer automatically your Responsive Form to Classic Form. 

 

^^

0 Kudos
Reply