I have created an inventory record. I have also created a transaction record. I have embedded the transaction view into the inventory record.This is great as it only displays the transaction records for the specific inventory item.
Is it possible to embed the total of a column field, from the transaction view, into a field in the inventory document.
I would like to set an agent based on the totals of the fields in the transaction view.
Thanks for your time.
Subject: RE: Including View Total in a document.
You could do something like this in a computed field:
_tmp := @IfError(@DbLookup(“”; “”; “yourview”; InventoryID; 3); 0);
@Sum(_tmp)
However, you have to realize that fields that you put on a form, only get updated when the form is edited and saved. The computed value will not be recalculated automatically when you create a new transaction. So the value is not really useful in an agent.
You could, however, write a scheduled agent that uses a formula similar to the above to periodically update the total in every inventory document.
Subject: RE: Including View Total in a document.
Thanks for the suggestion, even though it doesn’t update automatically, I expected that, this is going to work great.Thanks again.