Alternating contacts
Hi,
I'm trying to see if I can assigned alternating contacts for rows for some children rows. What I would love to do is find a way to reference the last children row contact from one location and then start off with the other but I'm having a bit of a struggle.
Initially my plan was to create some auto generated system numbers and then use a match formula to identify what row number that system generated number would be at. When I tried doing an iseven formula and tried alternating the contacts that way, the numbers were lopsided since not every location has the same amount of children floors.
I then tried to see if I could change the match column formula to reference the parent of the auto generated numbers but that did not pan out either.
Anyone have any thoughts on how tackle this? Any help would be appreciated. Thanks!
Best Answer
-
Hi @kioshi43
It sounds like you just need to add another helper column in, to identify if the current row is a Child row or a Parent row!
Try adding in a column with this formula:
=PARENT([Primary Column]@row)
This will return a blank cell if that row is a Parent, or the Parent Name if the row is a Child. Then you can reference this in a COLLECT Function so you can filter out all of the Parent Rows and only look at the auto-number if the row is a Child:
RANKEQ([Row ID]@row, COLLECT([Row ID]:[Row ID], [Parent Name]:[Parent Name], <>""), 1)
Then you can embed this into an IF statement to say that IF the Child Rank based on the Row ID (the auto-number) is Even, return the text "Even", otherwise return "Odd".
Full formula:
=IFERROR(IF(ISEVEN(RANKEQ([Row ID]@row, COLLECT([Row ID]:[Row ID], [Parent Name]:[Parent Name], <>""), 1)), "Even", "Odd"), "")
Then you can use if the cell says "Even" or "Odd" to auto-assign someone in your Assigned To column. You could also change out the IF statement output to be an email address or someone's name, if you prefer.
Let me know if this makes sense and will work for you!
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now
Answers
-
Hi @kioshi43
It sounds like you just need to add another helper column in, to identify if the current row is a Child row or a Parent row!
Try adding in a column with this formula:
=PARENT([Primary Column]@row)
This will return a blank cell if that row is a Parent, or the Parent Name if the row is a Child. Then you can reference this in a COLLECT Function so you can filter out all of the Parent Rows and only look at the auto-number if the row is a Child:
RANKEQ([Row ID]@row, COLLECT([Row ID]:[Row ID], [Parent Name]:[Parent Name], <>""), 1)
Then you can embed this into an IF statement to say that IF the Child Rank based on the Row ID (the auto-number) is Even, return the text "Even", otherwise return "Odd".
Full formula:
=IFERROR(IF(ISEVEN(RANKEQ([Row ID]@row, COLLECT([Row ID]:[Row ID], [Parent Name]:[Parent Name], <>""), 1)), "Even", "Odd"), "")
Then you can use if the cell says "Even" or "Odd" to auto-assign someone in your Assigned To column. You could also change out the IF statement output to be an email address or someone's name, if you prefer.
Let me know if this makes sense and will work for you!
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now -
That works out, thank you! SOrry, I thought I had replied to this and only now realized I didn't. Thank again!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.2K Get Help
- 360 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 444 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!