Total calculation based on workflow satus - Forum - Rollbase - Progress Community

Total calculation based on workflow satus

 Forum

Total calculation based on workflow satus

This question is answered

Hi all,

I have run into a formula problem I can’t figure out on my own, so I am counting on youSmile

I am trying to create a formula, which will calculate the total amount my project will cost.
This total cost will exist of all the approved budgets.

The total cost will exist of some already defined expression fields.
These expression fields exist of the following formulas:

- Project budget incl. Indexation incl. VAT (The initial budget of the project * indexation) *1,21 (VAT)

 

 

- Exception budget incl. Indexation incl. VAT (The budget of changes or exceptions that occur on the project * indexation) * 1,21 (VAT)

 

These exceptions have an approval chained to them.
The approvals changes the workflow status, occurring to which approval has been done.

My wish is to only use the exceptions which are ‘Approved’, so with the workflow status ‘Approved’ (this means they need to have been approved by the final approver)

 

How can I make sure I get a total calculation of the project cost + the cost of all exceptions which have been approved (related to this specific project)?

Thanks in advance and I look forward to hearing from you!

Greetings,

Ramon Schouten

QAP P3 Solutions

Verified Answer
  • Hi Ramon,

    Value of workflow status can be queried inside formula area for expression/formula fields using integration code of the field such as

    if("{!R1677405.status#code}" == "APR") { } or

    if we are querying the database then as

    Select name from Exception where status = 1677483;

    Here, status is the integration code of the field:  Workflow Status

    APR/1677483 - is integration code/id of "Approved" status

    I have designed a basic application around your use case, with 'Project' as primary record and 'budget' and 'exceptions' as related records. Using this metadata, i have calculated initial funding and 'approved' exception based funding as expression fields. I'm attaching the app xml. See, if this helps.

    Community _ Projects_v1.xml

    Thanks,

    Nitin

All Replies
  • Hi Ramon,

    Value of workflow status can be queried inside formula area for expression/formula fields using integration code of the field such as

    if("{!R1677405.status#code}" == "APR") { } or

    if we are querying the database then as

    Select name from Exception where status = 1677483;

    Here, status is the integration code of the field:  Workflow Status

    APR/1677483 - is integration code/id of "Approved" status

    I have designed a basic application around your use case, with 'Project' as primary record and 'budget' and 'exceptions' as related records. Using this metadata, i have calculated initial funding and 'approved' exception based funding as expression fields. I'm attaching the app xml. See, if this helps.

    Community _ Projects_v1.xml

    Thanks,

    Nitin

  • Hi Nitin!

    Excuse me for my late reaction.

    This indeed has solved it! thanks alot!