Hi everyone,
I need some help to show a specific value depending on the value from 4 boolean fields ( 401 to 404 )
Part of my table :
// Allergenes
field(401; "Lait"; Boolean) { }
field(402; "Fruits coque"; Boolean) { }
field(403; "Céleri"; Boolean) { }
field(404; "So2"; Boolean) { }
field (510; "Allergen"; Text [250]) { }
Calcformula ?
When 401,402,403 and 404 are false : i want that the field "allergen" value = "This product does not contain allergen"
When for an exemple the field 401 and 403 are true : i want this value in the field "Allergen" : "this product contains "Lait" and "Céleri"
If 402 are true : This product contains "Fruits coque"
I suppose that i need to write a formula on my Card page like this ( but i have absolutely no idea on how to write this formula...)
procedure alllergene()
begin
if (rec.Lait=false) and (rec."Fruits coque"=false) and (rec."Céleri"=false) and (rec.So2=false)
then rec.Allergenes := 'Ce produit ne contient pas d''allergenes'
else
if (rec.lait=true) or (rec."Fruits coque"=true) or (rec."Céleri"=true) or (Rec.So2=true)
then rec.Allergenes := 'Ce produit contient les allergenes suivants :'; (here i need the list of TRUE)
end;
Its works when all are false, but when one are true, i need to write the list off wich are true...
Probably can be done with filter ? concatenate ? others ? I have no idea how can it be done....
Thanks in advance for your help.