How to determine if a row id is in the list of predecessors for any row
Hello, I have a fairly large Project plan with 700+ rows and am new to Smartsheet.
My predecessors list for any given task has multiple row IDs referenced (comma delimited)
With help from Rob Hagan's post (https://community.smartsheet.com/discussion/formula-determine-row-number), I have created the ROW_ID) column for reference in my formulas).
My Ultimate goal:
I would like to create a dependencies column in my spreadsheet.
I'm looking for help on how to best do that.
I was thinking of using the Join and Collect functions, but don't know how to get it to work. What should I put in the cirterion field? (i.e. I'm looking for help in replacing "contains Row_ID1)" with the proper formula.)
=JOIN(COLLECT([ROW_ID]1:[ROW_ID]40,[Predecessors]1:[Predecessors]40, "contains " row_id1),","))
where "ROW_ID" column contains the "Row # matching the system Row ID and "Predecssors column contains the comma delimited list of predecessor referernces.
Comments
-
Shaine Greenwood Employee
Hi Nel C,
Are you using the built-in Dependency functionality? You might benefit from seeing this in the Gantt directly.
More on built in dependencies here:https://help.smartsheet.com/articles/765727-enabling-dependencies-using-predecessors
Otherwise, there isn't a contains or wildcard type feature in Smartsheet formulas.
Maybe with more information on what you're wanting to accomplish with the column that exists outside of the normal dependencies functionality, I (or other community members) can figure out a solution.
-
Nel C ✭✭✭
Hi Shaine,
Thanks for your reply. Like many others, I am trying to find a way to display the list of successor or dependent tasks on a given row. (i.e. the opposite to Predecessors).
So, If TASK 3 and TASK 4 (on rows, 3 and 4 respectively) are dependent on TASK 1 (on Row 1), then the Successor Column on Row 1 will list "3, 4").
I recognize that the Gantt chart shows dependencies via the arrows but I have over 1000 rows in my sheet and there are multiple dependencies...so it becomes harder to scroll and follow the different paths back to the successor. - hence my desire to display it in a column.,
Using a couple of columns, I have managed to transform the predecessor field (which is potentially a comma de-limited field with a mixture of straight row IDS, as well as ROW IDs with leads/lags etc. ) e.g. (3,45FF,5SS +1d) -> (,3,45,5,).
What I still can't get to work is the Join/Collect function to return the list of rows where cells in the criterion range have comma delimited lists.
Question: Can I have an "if statement" in the criterion field of the Collect function?
这是我目前but it doesn't work:
JOIN(COLLECT(RowNum:RowNum, PREDMinusS:PREDMinusS,
@cell=IF(FIND("," + RowNum@row + ",", PREDMinusS@row) > 0, PREDMinusS@row, 0 ) ) ,")
where,
RowNum is the column with the ROw IDs that I want to return.
PredMinusS is the column containing the :cleaned up, comma-deliminted list of Predecessors (i.e. without FS, FF, SS, SF) on which I can search for the Row ID.
Problem is, as you likely know, the FIND function returns the place in the string where the search key is found, 0 if not. However, the PREDMinusS fields contain the delimited list ...so I thought that if I wrap the FIND statement with the "IF statement to return the content of the PREDMinusS cell, then I would be golden....but sadly..it is not working for me. ....is there a way to assign the if statement to"...
ANY help you can give would be much appreciated.
Thanks!
-
Nel C ✭✭✭
For anyone trying to figure out how to determine a row's Dependencies (a.k.a Successors) in a sheet with hundreds or thousands of rows), I have found a way to provide as input, the rowid to be analyzed and return the list of rows that are dependent on it. (I.e. the opposite of "Predecessors"). I understand that the Gantt Chart view will show this if you follow the arrows...but in a large sheet, this is not practical.
Below is a link to the solution I came up with
I'm still hoping that Smartsheet will come up with a proper solution (i.e. provide a "Successors" column that auto populates as the Predecessors column is updated.
Hope it is helpful!
-
Udo ✭
Hi Nel C,
just would be interested on how you actually did that:
"Using a couple of columns, I have managed to transform the predecessor field (which is potentially a comma de-limited field with a mixture of straight row IDS, as well as ROW IDs with leads/lags etc. ) e.g. (3,45FF,5SS +1d) -> (,3,45,5,). "
Could not find a way so far.
Would be easy using "replacing with wildcards", but does not work in Smartsheet.(?)
Thanks
udo
-
Nel C ✭✭✭
Hi@Udo, Sorry, I did not see your post until now. It has been some time since I actually made use of this functionality . I had documented the details of my solution via the following post:https://community.smartsheet.com/discussion/looking-turn-predecessors-cell-comma-delimited-list-without-ff-fs-x-d-etc#comment-83186
Perhaps you can take a look there to get the answers you are looking for. I noticed that others have come up with improvements as well. - maybe something even more streamlined than the clunky solution I came up with
Good luck!
Nel
Help Article Resources
Categories
Check out theFormula Handbook template!
=COUNTIFS([Item Number]:[Item Number], OR(@cell = \"C001\", @cell = \"COO2\", @cell = \"COO3\", @cell = \"COO4\"), [Status]:[Status], OR(@cell = \"Green\", @cell = \"Yellow\", @cell = \"Red\"))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","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":109490,"type":"question","name":"HAS exact match within multiselect - Numbered Values","excerpt":"Scenario: Trying to identify a match if a value shows up in a multiselect from another sheet. Approach: I'm able to get 95% of this done through an index(collect(contains))) formula, but having some false positives show up wherever a partial match is found. I later found some suggestions that (has) would be more…","snippet":"Scenario: Trying to identify a match if a value shows up in a multiselect from another sheet. Approach: I'm able to get 95% of this done through an index(collect(contains)))…","categoryID":322,"dateInserted":"2023-08-25T19:26:32+00:00","dateUpdated":null,"dateLastComment":"2023-08-26T00:49:48+00:00","insertUserID":154049,"insertUser":{"userID":154049,"name":"Rob W.","url":"https:\/\/community.smartsheet.com\/profile\/Rob%20W.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-26T00:49:37+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":154049,"lastUser":{"userID":154049,"name":"Rob W.","url":"https:\/\/community.smartsheet.com\/profile\/Rob%20W.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-26T00:49:37+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":16,"score":null,"hot":3386003780,"url":"https:\/\/community.smartsheet.com\/discussion\/109490\/has-exact-match-within-multiselect-numbered-values","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109490\/has-exact-match-within-multiselect-numbered-values","format":"Rich","lastPost":{"discussionID":109490,"commentID":392694,"name":"Re: HAS exact match within multiselect - Numbered Values","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392694#Comment_392694","dateInserted":"2023-08-26T00:49:48+00:00","insertUserID":154049,"insertUser":{"userID":154049,"name":"Rob W.","url":"https:\/\/community.smartsheet.com\/profile\/Rob%20W.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-26T00:49:37+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/KJPRLKL2FW16\/capture-png.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"Capture.PNG"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-26T00:49:35+00:00","dateAnswered":"2023-08-25T23:58:23+00:00","acceptedAnswers":[{"commentID":392688,"body":"
Hi, <\/p>
Instead of applying the formula to \"Multiselect Text String\" row, did you tried with \"Multiselect Values\" row?<\/p>
=IF(HAS([Multiselect Values]@row, [Component ID]@row), \"MATCH\", \"NO MATCH\")<\/p>
Thank you,<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","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":[]},{"discussionID":109474,"type":"question","name":"Help with date calculation formula","excerpt":"Hello, I'm trying to find a formula that will help me calculate how long an intake took to resolve. The rows I need to be calculated are Date Reported & Resolution Date. If the resolution date is blank I want it to use the current date in the calculation to see how long this issue has gone unresolved. Any help is much…","snippet":"Hello, I'm trying to find a formula that will help me calculate how long an intake took to resolve. The rows I need to be calculated are Date Reported & Resolution Date. If the…","categoryID":322,"dateInserted":"2023-08-25T16:29:39+00:00","dateUpdated":"2023-08-25T16:29:59+00:00","dateLastComment":"2023-08-25T23:01:30+00:00","insertUserID":165688,"insertUser":{"userID":165688,"name":"Nwest","title":"Systems Analyst","url":"https:\/\/community.smartsheet.com\/profile\/Nwest","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!ukHVZ18ImX4!BcjWAe8S9SY!l7iQo_PZHOx","dateLastActive":"2023-08-25T17:22:30+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":165688,"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-08-26T14:46:22+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":23,"score":null,"hot":3385987269,"url":"https:\/\/community.smartsheet.com\/discussion\/109474\/help-with-date-calculation-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109474\/help-with-date-calculation-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109474,"commentID":392687,"name":"Re: Help with date calculation formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392687#Comment_392687","dateInserted":"2023-08-25T23:01:30+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-08-26T14:46:22+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-25T17:04:22+00:00","dateAnswered":"2023-08-25T16:36:59+00:00","acceptedAnswers":[{"commentID":392622,"body":"