Isolate a List ID from a lookup field


Badge +9

I have List A that allows multiple ID's to be selected via a lookup field souced in List B. The ID's display as 23;24;25.  Since I need to isolate these ID's so I can later update List B with some data from List A what would be the best course of action to isolate the ID's.  Once I have the ID's isolated my plan was to do a For Each on the ID and update List B via Query List.

I know I need to do a regular expression to split, but I am not sure how...My flow would be

Regular Expression

Collection ?

For Each 

Query List


3 replies

Userlevel 4
Badge +12

Hey David,

yes you could go through all that regEx stuff but I prefer letting SharePoint do work for me. Try this:

- go to list settings of list A

- edit your lookup column to list B

- Tick "ID" as additional fields to show

- save

200098_pastedImage_3.png

SharePoint will now add a column that holds the id's of all elements you looked up by the context column. So it's easy for you to split by semicolon.

200096_pastedImage_1.png

Would that help?

Kind regards,

Enrico

Badge +9

Sounds good, but when I do the query list I can feed it the Lookup:ID ?

Userlevel 4
Badge +12

Yes, you can use the ID-column like any regular column.

Reply