Solved

Set Field Value from Lookup Field (multi-values)

  • 24 June 2020
  • 1 reply
  • 123 views

Hello,

 

We are trying to set a target field with the values from a Lookup Field. 

 

Problem: Without any manipulation we get funky results such as [{"Product_x0020_Name":[{"FAMILY_SERIES":"tester-400"},{"FAMILY_SERIES":"tester-i3"}]}]. 

 

Desired Results: tester-400,tester-i3

 

Note: When exporting the list to excel or connecting to Tableau the Lookup field has the funky format as shown above, which is why we are looking to convert the Lookup values to "text" so it can export as "tester-400,tester-i3".

 

Attempted to solve this problem by: using a regular expression and then setting the field value using the output from the regular expression. This works if there is only one lookup value in the field. If a user selects two values in the lookup field, the regular expression solution doesn't work - it doesn't set the value of either one on the target field/column

 

I don't have experience with JSON or coding/scripting. We are looking for a solution via a workflow if possible.

 

Any help or insight is greatly appreciated

 

Thanks

icon

Best answer by leighburke 24 June 2020, 02:59

View original

1 reply

Userlevel 5
Badge +13

@ckatz Rather than you using a regular expression you could look at using a replace substring in string action(https://help.nintex.com/en-US/office365/Designer/Actions/Replacesubstringinstring.htm). You can replace each section of the unwanted characters e.g. "}]}] with either a blank or text to format the string. You will need to use multiple copies of this action but you should be able to get the output you are looking for.

Reply