Item List - new calculated field based on other fields

shogan@mila.ieshogan@mila.ie Member Posts: 113
Hi all,

On our Item Card, we have a custom decimal field called "EWS".

I have created an unbound field (decimal) on the Item form, and have it calculating Inventory/EWS, and all is well.

Now I want to adopt the same calculation on the Item List form and include an unbound field on it, but I am unsure how to have the field with the calculation Inventory/EWS update for each record displayed in the item list - early attempts have resulted in the same value being repeated for all items on the item list; even thought there are different values for Inventory and EWS for each item.

Any help appreciated.

The unbound field is purely for information purposes, and the calculation is not intensive.

Note that EWS can be 0.00 - I have coded for this on the Item form, but I also need to cater for this in the Item List.


Thanks a million.


The datalore.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    Best trick:
    Create a function "GetSomeValue" in which you give as parameter an item record (the CURRENT item record) and returns a decimal.

    In the field on the form (card or list form), you put in the SourceExpression "GetSomeValue(Rec)".

    In the function you use the item info you get from the parameter to calculate the return-value.

    An extra trick : put the function in the item record. This way you only write the function once and you can always use it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.