Hi, there’s a option-field on table “27 item” called “Price/Profit Calculation”. The field can have these 3 values : Profit=Price-Cost Price=Cost+Profit No Relationship If I have the value in a text-field (wTxt Text (30)), how can I then ‘copy and validate’ this value into the field ? I’ve tried with item.VALIDATE(“Price/Profit Calculation”,wTxt) but this gives me the error : “Type conversion is not possible…Option := Text”[?]
Hi, You’re looking for the EVALUATE function - this is necessary wherever you want to assign a code or text value to an integar, option, decimal etc. Alternatively, you could assign an integar variable with the corresponding value (IF textvar = ‘Profit=Price-Cost’ THEN intvar := 0 etc.) You could then do: item.VALIDATE(“Price/Profit Calculation”,IntVar); Hope that helps - if you use the second method just remember that the first option is 0, not 1.