How can I collect and join IDs of other rows based on the own row ID?
I have the columns "Auto number", "I am following" and "Followed by". I manually maintain the "I am following" column by entering 1 or more IDs of other rows in blank-separated form. Now I would like to fill the "Followed by" column automatically by collecting all IDs of rows in which the respective row ID is mentioned in the "I am following" column.
I have tried to combine the JOIN COLLECT and CONTAINS functions, linke this:
=JOIN(COLLECT([ID]:[ID]; [
I am following]:[
I am following]; CONTAINS(ID@row, @cell), " "))
But I am failed.
Example:
Best Answer
-
Hello jmyzk_cloudsmart_jp
Yes, that was stupid with the semicolon - I guess an old habit from Excel came through ... 😅
Many Thanks! 🙏
Answers
-
if its multiselect then use a HAS
=JOIN(COLLECT([Row ID]:[Row ID], [Uses Object]:[Uses Object], HAS(@cell, [Row ID]@row)), CHAR(10))
-
does not work completely. I have pasted your formula into my sheet and it looks like this now:
But in the row of x001 I expect the values x002 and x003. The problem may be, that the value in "Uses Object" is not equal the ID "x001" but contains it.
-
Your formula is fine, except you have to use commas (, ) instead of semicolons ( ; ).😅
=JOIN(COLLECT([ID]:[ID]; [I am following]:[I am following]; CONTAINS(ID@row, @cell), " "))
=JOIN(COLLECT(ID:ID, [I am following]:[I am following], CONTAINS(ID@row, @cell)), " ")
If you change the "Uses Object" column to a multi-select dropdown list column, markkrebs's should work.
-
Hello jmyzk_cloudsmart_jp
Yes, that was stupid with the semicolon - I guess an old habit from Excel came through ... 😅
Many Thanks! 🙏
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!