AnsweredAssumed Answered

Query List Item ID to populate List Item control

Question asked by dgraves on Jun 25, 2018
Latest reply on Jun 26, 2018 by emha

Hello there,

 

I'm a Nintex newbie so bear with me.

 

I have two forms. The first list is called Monitor Tracking - Classic and the second list is called UFF Tracking - Classic. I want to populate fields based on a lookup function that pulls column data from the first list. The user will type in a known number into a field named "Monitor Number". Typing this in, should pull the data from the first list that matches the Monitor Number. I noticed that the Classic form has a control called "List Item". Here's how I attempted to use it. Anyone know what I'm doing wrong? Or will this form control not accomplish what I'm looking to do?

 

  1. I created a Form Variable named Monitor_Item_ID with a lookup formula that will pull the value from the list item's ID column:   lookup("Monitor Tracking - Classic", "Monitor Number", Monitor_Number, "ID")Form Variable screenshot
  2. I then added the List Item control to my form. Edited the control settings. It seems as though the List Item ID field in the control properties wants a number because I get this error if I type in the form variable name.
  3. So then I tried to use the GetStringQuery formula to pull the ID. It did not give me an error so I had high hopes that it would work. I set the Advanced settings to show an error if the list item doesn't exist to aid in troubleshooting.
  4. However, when I click Preview and type in a known good number into the Monitor Number field and tab to the next field to trigger the runtime refresh, the List Item doesn't populate.
  5. So I thought maybe it won't work in preview mode so I save and publish my form. Then click New Item and populate the Monitor Number field. Unfortunately I get the error that the list item with zero doesn't exist.

 

So this leads me to believe that my formula in the "List Item ID" isn't correct. Help!

 

UPDATE: I just had a thought and decided to validate that my "Form Variable" is working. So I used the same lookup syntax as I did in the form variable at the beginning of my post. I put it into a Calculated Field instead so I could actually see the value that it pulls. Unfortunately after I type in the Monitor Number and tab to the next field, I can see the calculated field "Loading..." but then it doesn't return any value. Ugh.

 

UPDATE #2: I fixed the Form Variable. I changed the formula to:  

lookup("Monitor Tracking - Classic", "ID", Monitor_Title, "ID")

and now it pulls the list item ID. But it's still not populating the List Item control based on the GetQueryString formula.

 

Oh and if anyone has a better way of achieving this, please let me know. I could just use several Calculated Value controls to pull the data from the other list but I thought maybe the List Item control would be easier.

Outcomes