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
-
Jeff Reisman ✭✭✭✭✭✭
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([email protected]= "D", $Employee$1, "")
Regards,
Jeff Reisman,IT Business Analyst & Project Coordinator,Mitsubishi Electric Trane US
链接:Smartsheet Functions Help Pages链接: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
-
Jeff Reisman ✭✭✭✭✭✭
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 toconvert the Shift columns from Contact-type columns to regular Multi-Select columns, and you'll need tocreate a new regular multi-select column (let's call it "Employee",) listing your employees:
Let's start with the Day Shift column:
=IF([email protected]= "D", Employee1) + IF([email protected]= "D", Employee2) + IF([email protected]= "D", Employee3) + IF([email protected]= "D", Employee4) + IF([email protected]= "D", Employee5) + IF([email protected]= "D", Employee6) + IF([email protected]= "D", Employee7) + IF([email protected]= "D", Employee8) + IF([email protected]= "D", Employee9)
The result of this, in a multi-select column, is each name listed as a distinct value in the multi-select 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,IT Business Analyst & Project Coordinator,Mitsubishi Electric Trane US
链接:Smartsheet Functions Help Pages链接: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!
-
JPFORDTE ✭
嗨,杰夫,
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.
-
Jeff Reisman ✭✭✭✭✭✭
Without seeing your entire formula and the lookup list of employee names, I couldn't say.
Regards,
Jeff Reisman,IT Business Analyst & Project Coordinator,Mitsubishi Electric Trane US
链接:Smartsheet Functions Help Pages链接: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!
-
JPFORDTE ✭
Employee List:
Formula (this one looks up the correct people but there is also a zero that is returned in this cell):
=IF([email protected]= "D", $Employee$1) + IF([email protected]= "D", $Employee$2) + IF([email protected]= "D", $Employee$3) + IF([email protected]= "D", $Employee$4) + IF([email protected]= "D", $Employee$5) + IF([email protected]= "D", $Employee$6) + IF([email protected]= "D", $Employee$7) + IF([email protected]= "D", $Employee$8) + IF([email protected]= "D", $Employee$9) + IF([email protected]= "D", $Employee$10) + IF([email protected]= "D", $Employee$11) + IF([email protected]= "D", $Employee$12) + IF([email protected]= "D", $Employee$13) + IF([email protected]= "D", $Employee$14) + IF([email protected]= "D", $Employee$15) + IF([email protected]= "D", $Employee$16) + IF([email protected]= "D", $Employee$17) + IF([email protected]= "D", $Employee$18)
-
Jeff Reisman ✭✭✭✭✭✭
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([email protected]= "D", $Employee$1, "")
Regards,
Jeff Reisman,IT Business Analyst & Project Coordinator,Mitsubishi Electric Trane US
链接:Smartsheet Functions Help Pages链接: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!
-
JPFORDTE ✭
Legend! Thank you Jeff, this worked!
-
Jeff Reisman ✭✭✭✭✭✭
太棒了!
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,IT Business Analyst & Project Coordinator,Mitsubishi Electric Trane US
链接:Smartsheet Functions Help Pages链接: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
@Shawn_K2<\/a> UGH I make a mistake. I copied your formula without looking at it close enough 😜<\/span><\/p> try =COUNTIFS({CPR Request Type}, HAS(@cell, \"VAVE\"))<\/p>"},{"commentID":382446,"body":" @Shawn_K2<\/a> <\/p> =COUNTIFS({CPR Request Type}, HAS(@cell, \"VAVE\"), {CPR Brand}, HAS(@cell, \"ING\"))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":106847,"type":"question","name":"Missing drop-down options in my filter selections. Where did they go?","excerpt":"I have been creating filters and for some reason a couple of my drop-down options are not showing up as filter selections, even though they are correctly showing up as drop-down options in the sheet. To illustrate, here are the drop-down options I have for a column in my sheet, which are working correctly: but when I try…","categoryID":321,"dateInserted":"2023-06-23T18:16:31+00:00","dateUpdated":null,"dateLastComment":"2023-06-26T16:54:06+00:00","insertUserID":162342,"insertUser":{"userID":162342,"name":"mgreenwalt","title":"coordinator","url":"https:\/\/community.smartsheet.com\/profile\/mgreenwalt","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-26T17:20:03+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":8888,"lastUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-06-27T06:21:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":10,"countViews":65,"score":null,"hot":3375348637,"url":"https:\/\/community.smartsheet.com\/discussion\/106847\/missing-drop-down-options-in-my-filter-selections-where-did-they-go","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106847\/missing-drop-down-options-in-my-filter-selections-where-did-they-go","format":"Rich","lastPost":{"discussionID":106847,"commentID":382360,"name":"Re: Missing drop-down options in my filter selections. Where did they go?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382360#Comment_382360","dateInserted":"2023-06-26T16:54:06+00:00","insertUserID":8888,"insertUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-06-27T06:21:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Using Smartsheet","url":"https:\/\/community.smartsheet.com\/categories\/using-smartsheet"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/2JV6OYUHWHZT\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-26T16:04:32+00:00","dateAnswered":"2023-06-26T15:48:56+00:00","acceptedAnswers":[{"commentID":382315,"body":" Thanks @topazfae<\/a> for your time and efforts and I'm happy to announce that @Genevieve P.<\/a> solved this challenge 😃<\/span> - <\/p> \"I can see that your two selections have 135 and 142 characters each. When I cut the character count under 100<\/strong>, they appear as options to filter by.\"<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=341&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":5409,"limit":3},"title":"Trending in Using Smartsheet","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">
<\/p>