none
Project field formula to populate another project field RRS feed

  • Question

  • Need help creating two project entity fields where one populates the other based on the choice of the first.  Scenario:

    1.  If user creates a new project and selects the project dept field as Accounting, or Finance, or Purchasing then...

    2.  The project business unit field automatically gets populated with Company A Group

    or...

    1.  If the user creates a new project and selects the project dept field as Engineering, or Sales, or Maintenance then...

    2.  The project business unit field automatically gets popluated with Company B Group

    How can I create a formula to do so?  Please be specific with formulas as I'm pretty new with Project Server 2010.

    thanks,


    -Chad

    Thursday, June 20, 2013 7:42 PM

Answers

  • If I understand your question correctly, this is what you can do:

    You set first field (called "Dept") as lookup field that contains values: Accounting, Engineering, Sales...

    Second field should be type of formula (let's call it "Business Unit"). In thet field you should put formula like this one:

    Switch([Dept] == "Accounting", "Company A",

    [Dept] == "Engineering","Company B",

    [Dept] == "Sales", "Company C",

    True,"Default company")

    So, this is a switch statement which does following: If you select Accounting in "Dept" field, then it puts value "Company A" in a field "Business Unit", if you select "Engineering", then it will put "Company C", etc. If nothing is selected, then it will put value "Default company" in field "Bussines Unit" (last row). If you want it to be empty if nothing was selected, then change that last row with:  True,"")

    Hope it helps.

    • Marked as answer by philldogger Tuesday, June 25, 2013 1:47 PM
    Monday, June 24, 2013 10:18 PM

All replies

  • anyone?  Maybe my example wasnt clear enough.  When creating a new project and the user selects Accounting, for example, in the Project Department field, I want the Project Business Unit field to automatically say Company A based on that Accounting department choice from the Project Department field/entity.  Vice versa, if the user chose Engineering as the department in the Project Department field then the Project Business Unit field would read Company B.

    -Chad

    Monday, June 24, 2013 5:15 PM
  • If I understand your question correctly, this is what you can do:

    You set first field (called "Dept") as lookup field that contains values: Accounting, Engineering, Sales...

    Second field should be type of formula (let's call it "Business Unit"). In thet field you should put formula like this one:

    Switch([Dept] == "Accounting", "Company A",

    [Dept] == "Engineering","Company B",

    [Dept] == "Sales", "Company C",

    True,"Default company")

    So, this is a switch statement which does following: If you select Accounting in "Dept" field, then it puts value "Company A" in a field "Business Unit", if you select "Engineering", then it will put "Company C", etc. If nothing is selected, then it will put value "Default company" in field "Bussines Unit" (last row). If you want it to be empty if nothing was selected, then change that last row with:  True,"")

    Hope it helps.

    • Marked as answer by philldogger Tuesday, June 25, 2013 1:47 PM
    Monday, June 24, 2013 10:18 PM
  • anyway to get around the 1024 character limit?  I have the formula working however it doesnt appear to save when it gets larger than 1024.

    -Chad


    • Edited by philldogger Tuesday, June 25, 2013 6:56 PM number change
    Tuesday, June 25, 2013 6:34 PM