Guild of Project Controls: Compendium | Roles | Assessment | Certifications | Membership

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

Formulas and Modifiers

8 replies [Last post]
Bogdan Leonte
User offline. Last seen 6 weeks 8 hours ago. Offline
Joined: 18 Aug 2012
Posts: 284

Hello Vladimir,

For some time I have been trying to figure out how to use modifiers in formulas but I am at a loss regarding their use. I manage to create formulas using modifiers but it's more of a trial and error process.

I found it useful to be able to set distance lags for infrastructure projects. In order to use such a lag I use the following fields:

  1.  Start Location
  2. Finish Location
  3. User Field called Distance Lag [m], wich contains the distance between 2 activities
  4. Formula, which is applied in the Links table, formula which computes (depending on the type of links - SS or FF) the volume of the lag according to the Distance.

The formula is as follows:

Lag = if ( LagType  = 'Volume' and LagUnit = 'Unit of volume', RoundTo ( if ( Code [ Code , ?PredCode , GanttAct ] = PredCode and TypeSF = 'Start-Start',  VolPlan [ Code , ?PredCode , GanttAct ] / ( LocFin [ Code , ?PredCode , GanttAct ] - LocStart [ Code , ?PredCode , GanttAct ] ) *  Dist_Lag [ Code , ?PredCode , GanttAct ], If ( Code [ Code , ?PredCode , GanttAct ] = PredCode and TypeSF = 'Finish-Finish', VolPlan [ Code , ?SuccCode , GanttAct ] / ( LocFin [ Code , ?PredCode , GanttAct ] - LocStart [ Code , ?PredCode , GanttAct ] ) *  Dist_Lag [ Code , ?PredCode , GanttAct ], Lag ) ), 4), Lag )

The problem I have is that I don't fully understand modifiers and cannot get the formula to be called from the Activity Gantt into the Links Table.

If you could go into more detail on using Formulas and Modifiers it would be much appreciated.

Best regards,

Bogdan

Replies

Rafael Davila
User offline. Last seen 1 day 1 hour ago. Offline
Joined: 1 Mar 2004
Posts: 5229

You can download the following sample schedules to explore Formula Modifiers.

Look for the notes under project properties as well as under formula creation screens.

Rafael Davila
User offline. Last seen 1 day 1 hour ago. Offline
Joined: 1 Mar 2004
Posts: 5229

If I am right and this is inherent in database tables maybe modifiers selection screen can be programmed to control data entry order and dim/hide those selections that cannot make the transfer/reference based on prior selections.

It would be convenient if formulas show in what view/table they were created (or belong).  In addition field values when not belonging to current view might display the name of the view/table they belong instead of "empty".

Bogdan Leonte
User offline. Last seen 6 weeks 8 hours ago. Offline
Joined: 18 Aug 2012
Posts: 284
Rafael, you are right, after further trying I concluded that the only way you can do the transfer/reference is from the links table. The script I mentioned will be placed as favourite script and called using the F10 key, very easy in the end.
Rafael Davila
User offline. Last seen 1 day 1 hour ago. Offline
Joined: 1 Mar 2004
Posts: 5229

For each Activity record(row) in Gantt Table there can be many successors and many predecessors, each with its own record(row) in the Links Table. Field Modifiers are used to transfer data between tables but to my understanding can only handle one to one relationships.  It might be transfer of data from Gantt to Links Table are possible while transfer of data from Links Table to Gantt Table are not.

Bogdan Leonte
User offline. Last seen 6 weeks 8 hours ago. Offline
Joined: 18 Aug 2012
Posts: 284
Yes, I have to identify a modifier in the Activity Gantt to reference the Links table, which I haven't been able to do, any suggestions?
Rafael Davila
User offline. Last seen 1 day 1 hour ago. Offline
Joined: 1 Mar 2004
Posts: 5229

... cannot get the formula to be called from the Activity Gantt into the Links Table.

  • You rely on established relationships between the tables to pull the data together in meaningful ways.
  • While in Links View if you want to transfer values from Gantt Table to Links Table you must identify if relationship is:
    • Gantt activity code to Links predecessor activity code
    • or if Gantt activity code to Links successor activity code.
Bogdan Leonte
User offline. Last seen 6 weeks 8 hours ago. Offline
Joined: 18 Aug 2012
Posts: 284

Rafael,

maybe you will find this of use:

For linear works (roads, water supply, etc.) I created a procedure in order to calculate volume lags based on distance. I belive this can be applied also for other types of constructions.

You define a user field called Distance Lag [m] (or whatever you like) and the following formula, which is applied in the links table

Lag = if ( LagType  = 'Volume' and LagUnit = 'Unit of volume', RoundTo ( if ( Code [ Code , ?PredCode , GanttAct ] = PredCode and TypeSF = 'Start-Start',  VolPlan [ Code , ?PredCode , GanttAct ] / ( LocFin [ Code , ?PredCode , GanttAct ] - LocStart [ Code , ?PredCode , GanttAct ] ) *  Dist_Lag [ Code , ?PredCode , GanttAct ], If ( Code [ Code , ?PredCode , GanttAct ] = PredCode and TypeSF = 'Finish-Finish', VolPlan [ Code , ?SuccCode , GanttAct ] / ( LocFin [ Code , ?PredCode , GanttAct ] - LocStart [ Code , ?PredCode , GanttAct ] ) *  Dist_Lag [ Code , ?PredCode , GanttAct ], Lag ) ), 4), Lag )

Using a macro you can use this sequence of commands:

ProjTabApplyFormula (#24_Calc_Lag_Dist_Vol, LINK);
ProjCalcSched ();
ProjCalcCost ();

This is the result:

https://youtu.be/pSdSSBE2x9M

Best regards,
Bogdan

Bogdan Leonte
User offline. Last seen 6 weeks 8 hours ago. Offline
Joined: 18 Aug 2012
Posts: 284

I have found a workaround to apply formula directly in the Links table via script, ProjTabApplyFormula (Calc_Lag_Dist_Vol, LINK);