SOLVED

Creating a customized column to show the four predecessor task types

Copper Contributor

I would like to insert a column that shows which of the four (4) possible predecessor task types (FS, SS, FF, SF) all the tasks have.

Can anyone tell me if this is even possible, and if so, how can I set up this customized column?

Thank you so much!

 

7 Replies

@JonathanGlaser 

Is it possible? Sure, almost anything is possible.

 

If there is only one predecessor per task, as in Tasks b thru f below, then it could likely be done with a customized Text field (e.g. Text1) using the Mid function to parse the Predecessor field text string and pick out the dependency type. But, if there are multiple predecessors for a given task, as in Task g, then VBA is required.

2022-11-08_12-58-45.png

But I gotta ask, why in the world do you want that information?

John

@John-project Thank you, John!  This is so helpful.

Please would you help with the formula I need to enter to customize the text field so that I use the Mid function to parse out this information I need (sorry to be a pain)?

Thanks in advance!

Jonathan

 

Jonathan,
Well, before we proceed I need to clarify something. Does your file have ONLY a single predecessor for each task? As I noted in my initial response, if any task has more than one predecessor then a custom field formula will not work.
John
Hi John
Yup - confirming only a single predecessor for each task.
Thanks
Jonathan
best response confirmed by JonathanGlaser (Copper Contributor)
Solution
Jonathan,
Okay, then this formula should do it. Note, after posting my first response I realized it was not the Mid function but the Instr function that is needed.
Text1=IIf([Predecessors]<>"",Switch(instr(1,[Predecessors],"S")=0 And instr(1,[Predecessors],"F")=0,"FS",InStr(1,[Predecessors],"SS")>0,"SS",instr(1,[Predecessors],"FF")>0,"FF",instr(1,[Predecessors],"SF")>0,"SF",instr(1,[Predecessors],"FS")>0,"FS"),"")

John
Hi John
Thank you so much!
While I have some basic understanding of formula functionality, this one you provided introduced me to a function I'm unfamiliar with. It's been a valuable learning experience.
Could you perhaps point me to any helpful resource(s) where I can acquire further understanding specifically of formulae?
Kind regards
Jonathan
Jonathan,
You're welcome and thanks for the feedback.

I work a fair amount with VBA (Visual Basic for Applications) in Project and there is a lot of cross-over for custom field formulas. As far as a helpful resource, click on the Help tab on the Project ribbon and when the Help pane pops up just type in "custom field formulas". You can also contact my colleague Ismet Kocaman (just Google him), who has articles and publications on custom field formulas for Project. I'm sure there are also other books or help articles available on the internet but I can't cite any specific links.
John
1 best response

Accepted Solutions
best response confirmed by JonathanGlaser (Copper Contributor)
Solution
Jonathan,
Okay, then this formula should do it. Note, after posting my first response I realized it was not the Mid function but the Instr function that is needed.
Text1=IIf([Predecessors]<>"",Switch(instr(1,[Predecessors],"S")=0 And instr(1,[Predecessors],"F")=0,"FS",InStr(1,[Predecessors],"SS")>0,"SS",instr(1,[Predecessors],"FF")>0,"FF",instr(1,[Predecessors],"SF")>0,"SF",instr(1,[Predecessors],"FS")>0,"FS"),"")

John

View solution in original post