MS Project: Referencing field in specific task within the custom field formula RRS feed

  • Question

  • Hey,

    I am trying to setup a project in MS project 2007 (upgrading is unfortunately not an option :( ). my situation is as follows:

    task #12 has a custom text field, [Text30], that will either contain a 1 or a 0. I am trying to create a new custom field (for task #13), [Duration1]  that is conditional based on the value of [Text30] for specifically task #12. Is there a syntax to reference the field value of a specific task? 

    for ex >>  IIf([Text30]=1,1 d,0 d) will only reference [Text30] of the task that it is also on. I am looking for the syntax to do  something along the lines of: IIf(Task12.[Text30]=1,1 d,0 d) or IIf(Task12{[Text30]}=1,1 d,0 d) such that the condition of this value will always be the same and based only off [Text30] of [Task12]

    Please let me know if this is even possible....

    ~ Ben

    For Reference,

    I am trying to create a "gate" so to speak... such that if task 12 (a pass or fail check) fails then all of the milestones and tasks after it collapse to 0d and get marked 100% complete (ie cutting off parts of the project should the gate fail) should it pass the duration and completeness of the other tasks are to be unchanged.

    Wednesday, January 9, 2019 5:53 PM

All replies

  • Ben,

    Sorry, task custom field formulas can only reference other fields in the same Task and a few Project fields.  It would be simple to do what you like using vba, though the exact details depend on the relationship between task 12 and task 13.  For your particular application, vba also provides the key benefit of being able to directly manipulate the schedule (i.e. predecessors, successors, duration), which custom fields can't do.

    Good luck, tom 

    • Proposed as answer by Ismet Kocaman Thursday, January 10, 2019 7:07 PM
    Wednesday, January 9, 2019 7:12 PM
  • Thanks Tom,

    That's too bad :/. I have never used VBA before but I will see what I can do with it!!

    Wednesday, January 9, 2019 8:11 PM