Lookup Runtime Function Does Not Work When Referencing a Lookup Control

  • 26 March 2021
  • 0 replies
  • 71 views

Badge +8

Issue

When using a Lookup control as the 'value to filter on' within the Lookup runtime function of a Calculated Value control, the Calculated Value control returns a blank value, even when the function works as expected with a hard-coded value to filter on.

 

Resolution

Nest the Lookup control reference within the Lookup function inside of a parseLookup runtime function. For example, instead of this function:

lookup("list title", "column to filter on", value to filter on, "output column")

Use this:

lookup("list title", "column to filter on", parseLookup(value to filter on), "output column")

 

Additional Information

This is caused by the fact that Lookup controls do not actually return the value shown within the control. If the item 'Testing' was selected within a Lookup control, and 'Testing' has an ID of 3 on the source list, the Lookup control would return the following:  3;#Testing

The parseLookup runtime function parses out the Testing portion of that output, which in turn can be used as a reference within the original Lookup function.

 


0 replies

Be the first to reply!

Reply