Nunezma
Explorer

Passing value to a new form and setting lookup using querystring

I have a button on my form List A(CAR list) that allows to open new window and create a new item in List B (5why list) . I'm passing value Item ID (CARNumber) in the URL. And I can query this ID on my new item in List B using querystring function.

 

Question is how to  prepopulate a lookup field that corresponds to the passed value itemID and how to auto check the box link to existing CAR.

 

The purpose is that when users click the button to create a 5WHY action they are taken to a new 5WHY form that is already linked to the CAR list. So they don't have to manually select it.

 

claudiaurbanski_0-1623953773961.png

claudiaurbanski_1-1623953835898.png

claudiaurbanski_2-1623953920658.png

claudiaurbanski_3-1623953989270.png

claudiaurbanski_4-1623954171836.png

 

 

 

 

0 Kudos
Reply
4 Replies
ghaiashish
Contributor

Re: Passing value to a new form and setting lookup using querystring

You can use workflow to update this field

0 Kudos
Reply
Aleximo
Contributor

Re: Passing value to a new form and setting lookup using querystring

I know I am a bit late... did u already solved it by urself?

 

If not (and if I got it right u got the ID on the NewForm in List B):

 

U could set the Value (Example: 5) via JS in a textbox (that can be hidden somewhere on the form)

 

after that u could make a little JS function "if textbox isnt empty set the checkbox true" -- or you make a formula that is only activated when something is entered in the hidden textbox and then u could set the value with JS.

 

and u could link the 5 with a formula with a parselookup and a JS function to set the value.

 

Just an idea... bcs i dont know if u already solved it (so I didnt go into details).

0 Kudos
Reply
Nunezma
Explorer

Re: Passing value to a new form and setting lookup using querystring

@Aleximo thank you for the idea, will give it a try. I was able to partially " solve" it using JS, not to set the dropdown to the ID value but to only display that item in the dropdown. So user still has to click on the dropdown and select the only item displayed which ID is the value passed on.
0 Kudos
Reply
Aleximo
Contributor

Re: Passing value to a new form and setting lookup using querystring

If you only need the lookup to set itself maybe you could try the example in the following link:

 

https://community.nintex.com/t5/Community-blogs/Breaking-The-Rules-A-Dive-Into-The-Nintex-Forms-Rule...

 

under -Examples- the 2nd one: Automatic Option Selection

0 Kudos
Reply