Hi Developers,
I've a scenario to calculate "Total of amounts in purchase line where Purchase header is sent for approval" and show the data on Job Header.
I want to use a flowfield with CalcFormula of sum
Is it possible to do so? if Yes then how?
But we have Job no. on the line level.
In that case you have already two fields available on purchase header I.e. amount and amount inc. vat those are flow fields and have the sum of line amount total. You can try to use of them.
Hi Hasnain,
if I understood your question correctly, you want to calculate the Total Amount from Purchase Line where the Purchase Header is also involved to check the status is sent for approval, so as you might know that Flow FIelds can not be used in that way we can only use the table filters that we are using to calculate the value from, so in your case you need to customize some more you have following ways to achieve this :
1.) You Have to Create a field on Purchase Line to Mark that field if the Header is sent for approval and then you can use that field in your calc formula to filter purchase lines whose header is sent for approval.
2.) You can create a Field on Purchase Header as Total Line Amount but this should not be a flow field you need to make this field updated from your code only either on Open Page or onValidate of Purchase Line Unit Price and so on. then you can create the flow field using the Purchase Header table in Job Header you will have the filter of Purchase Header Status and you can use the field to as the total amount.
I will suggest you use the first option.
Please mark this answer as verified if this was helpful.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156