cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Automation Master
Automation Master

Lookup runtime function with Calculated value reference

Jump to solution

Hi

 

I'm hitting an issue here. I have a calculated value performing a "sum" on a bunch of controls in the form, and then another calculated value performing a lookup on a list where the value to filter on is the value returned in my first calculated value. If i hardcode the value in, it works great, if I put the reference to the calculated value in I get nothing. I can confirm the value in my calculated value is what I expect it to be (I've also tried outputting it as a string and an integer). I've tried publishing it and running the form from the list rather than preview but no joy.

Here's my formula

lookup("FrameSpec", "Code", FrameCode, "ColumnDepth")

doesn't work, but

lookup("FrameSpec", "Code", "309035150", "ColumnDepth")

does.

Below is the screen shot and the highlighted area is where the value should appear but returns nothing. 

Frame Code is my "sum" calculated value and the copy of the same code on the right is a test calculated value to make sure there's no erroneous values being output from the "sum".

I'm fairly confident I've done this before, but not for current company, can't quite figure out what I'm missing here. 

All help appreciated here, am sure it's a simple fix. This is O365 for reference.

Labels: (2)
0 Kudos
Reply
4 Replies
Highlighted
Automation Master
Automation Master

Re: Lookup runtime function with Calculated value reference

Jump to solution

So, buried in Sean Fiene‌'s blog about the function being introduced to O365 I found a comment that "resolved" this.

https://community.nintex.com/community/tech-blog/blog/2016/07/20/lookup-runtime-in-nintex-forms-for-... 

It seems the lookup function will only lookup to a number, not a string. This seems to be because there are no quotes around the filter value and therefore, the function treats it as a number. If you place quotes around the filter value named control, it must treat it literally or something like that. If I place quotes around the hard coded string, it works. This was bought up in August 2016 but seems to have been missed as I'm still experiencing the issue. Hopefully this will draw attention to it.

Reply
Highlighted
Automation Master
Automation Master

Re: Lookup runtime function with Calculated value reference

Jump to solution

And in further developments, placing an extra set of quotes and concats around the named control reference makes it work with a string.

So this formula allows you to lookup on a string. 

lookup("FrameSpec", "Code", ""+FrameCode+"", "ColumnDepth")

Can we get this documented if it's intended behaviour, and if it's already documented can someone point it out so I can punch myself for not being able to find it!

View solution in original post

Reply
Highlighted
Nintex Newbie

Re: Lookup runtime function with Calculated value reference

Jump to solution
saved me. Thanks
0 Kudos
Reply
Nintex Newbie

Re: Lookup runtime function with Calculated value reference

Jump to solution

Saved me too! Thank you!

0 Kudos
Reply