Workflow Automation  Assign People Function.
I have created a Shift Rota for my team. The left axis displays the day and date, the top axis displays each person broken down by team. In the table each person on each day gets assigned a letter depending on the shift they are assigned to (e.g D = Day Shift, A = Afternoon Shift).
I have then set up an automation to collect each person for each shift type per day.
The automations are as follows.
Depending on what letter they have assigned that day, this feeds into another table where it collects the different people on each shift.
The automation works when you reassign someone's shift. E.g you assign me from D (day shift) to N (Night shift) on the shift rota, the automation then puts my contact info into Night Shift Column on table on the right. However, my name still stays in the Day shift column.
Is there a way to remove a name from the previous cell it was in?
I understand using a and index(collect( or Join(collect is probably better but I have not found a way to do this given the many different variables it would have to look up.
Many thanks in advance!
Best Answer

When I create a similar formula, and none of the IF's is true (none of the columns has a "D" in it,) a "0" is placed in the cell. That's unexpected!
But, unlike what I see in yours, the "0" goes away when at least one of the IFs turns to true.
When I add a negative condition of "" (a blank value) to one of the IFs, I no longer get a "0" when none of the conditions are true. So add that at the end of your first IF (as shown below) and see if that works to get rid of the 0.
=IF(Joakim@row = "D", $Employee$1, "")
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Answers

In place of the automation, you can do this using a bunch of IF statements added together in each shift's column. However, you'll need to convert the Shift columns from Contacttype columns to regular MultiSelect columns, and you'll need to create a new regular multiselect column (let's call it "Employee",) listing your employees:
Let's start with the Day Shift column:
=IF(Joakim@row = "D", Employee1) + IF(Tuparna@row = "D", Employee2) + IF(kacper@row = "D", Employee3) + IF(Casper@row = "D", Employee4) + IF(Johnny@row = "D", Employee5) + IF(Hans@row = "D", Employee6) + IF(Jonny@row = "D", Employee7) + IF(Ronnie@row = "D", Employee8) + IF(Lasse@row = "D", Employee9)
The result of this, in a multiselect column, is each name listed as a distinct value in the multiselect cell.
For your Small Day Shift column, just change the "D"s in the above formula to "SD", and so on for the other shift columns.
This way, when someone's shift changes, the formulas update and the employee's name will move to the correct shift column.
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Hi Jeff,
thank you very much! this works.
one little issue:
Would you happen to know why for some rows it returns a zero? Couldn't figure out why.

Without seeing your entire formula and the lookup list of employee names, I couldn't say.
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Employee List:
Formula (this one looks up the correct people but there is also a zero that is returned in this cell):
=IF(Joakim@row = "D", $Employee$1) + IF(Tuparna@row = "D", $Employee$2) + IF(Kacper@row = "D", $Employee$3) + IF(Casper@row = "D", $Employee$4) + IF(Johnny@row = "D", $Employee$5) + IF(Hans@row = "D", $Employee$6) + IF(Ronnie@row = "D", $Employee$7) + IF(Jonas@row = "D", $Employee$8) + IF(Lasse@row = "D", $Employee$9) + IF(Simon@row = "D", $Employee$10) + IF(Jorgen@row = "D", $Employee$11) + IF(Jacob@row = "D", $Employee$12) + IF(Frederik@row = "D", $Employee$13) + IF(Naja@row = "D", $Employee$14) + IF(Jens@row = "D", $Employee$15) + IF(Tommy@row = "D", $Employee$16) + IF(Mark@row = "D", $Employee$17) + IF(Soren@row = "D", $Employee$18)

When I create a similar formula, and none of the IF's is true (none of the columns has a "D" in it,) a "0" is placed in the cell. That's unexpected!
But, unlike what I see in yours, the "0" goes away when at least one of the IFs turns to true.
When I add a negative condition of "" (a blank value) to one of the IFs, I no longer get a "0" when none of the conditions are true. So add that at the end of your first IF (as shown below) and see if that works to get rid of the 0.
=IF(Joakim@row = "D", $Employee$1, "")
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Legend! Thank you Jeff, this worked!

Great!
Now that I'm thinking about it  here's why the 0 gets placed in the cell, and why adding the "" fixes it:
Because we didn't give the IFs a negative condition (a value for if the logical expression is false,) and we are ADDING formulas together, Smartsheet assumes the negative condition is the default negative numeric value, which is 0. (For example, in a checkbox field, 1 is positive  checked, and 0 is negative, unchecked.) If you add a string of IFs that have conditions that are numbers (not in quotes,) Smartsheet will mathematically add the values together. By adding the "" (blank text) negative condition, that means instead of treating the formula like it's 0 + 0 + 0 etc, it treats it as blank text + 0 + 0, effectively turning the cell into a text cell, and therefore not "adding" all the zeroes together.
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Categories
 All Categories
 14 Welcome to the Community
 Smartsheet Customer Resources
 61.2K Get Help
 320 Global Discussions
 197 Industry Talk
 415 Announcements
 4.2K Ideas & Feature Requests
 126 Brandfolder
 153 Just for fun
 123 Community Job Board
 441 Show & Tell
 26 Member Spotlight
 1 SmartStories
 276 Events
 34 Webinars
 7.3K Forum Archives