Solved

NWC workflow returns IDs instead of Values for SharePoint List Lookup Field

  • 30 November 2022
  • 1 reply
  • 27 views

Badge +3

I have a SharePoint online list called CRs with a field called Application which is a lookup field to another list called Applications. The field allows for multiple selections.





I need to display those values in various emails throughout the NWC workflow whose start event is a New Item in the CR list. As you might imagine, the values actually displayed in the email are the IDs of the applications in the list rather than the Names - i.e. 1; 3 instead of Clarinet; SharePoint.







I know I need to somehow get the ids then loop through each one to retrieve the Application Name but I'm having a hard time pulling it together with the right actions. Hoping someone else has faced this challenge before and as a solution. Thanks in advance for your help.

icon

Best answer by WouterT 1 December 2022, 09:48

View original

1 reply

Userlevel 3
Badge +9

Good question as it happens often.



Here is my example that hopefully explains it:





I have a test list with a Countries field that selects multiple countries from a list named Countries.



I define the lookup field Countries in my new SharePoint test list like this:





The extra tick box for Countryname comes handy later on.



I entered some data:





Next, I created a test workflow that looks like this:





So, I query all the items and loop through each of them.



The body for the send an email action has this:







Finally, I run a test and receive this email:





Sharepoint does the work here for us actually. Hope this helps.

Reply