Passing value to a new form and setting lookup using querystring

  • 17 June 2021
  • 4 replies
  • 212 views

Badge +11

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.

 

18275iBA466449F3B741FE.png

18276i5B19D3C375CCC4EF.png

18277iFFBDA9FBA7C0C398.png

18278iEF0EFE803032DFAA.png

18279i494464F23C177852.png

 

 

 

 


4 replies

Userlevel 2

You can use workflow to update this field

Badge +8

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).

Badge +11
@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.
Badge +8

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-System/ba-p/78874


 


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

Reply