Hi all, I need to display an error message that explain a rule as this one: ERROR(‘When %1 is %2 then %3 must be %4’, FIELDCAPTION(“Document Type”), “Document Type”::Invoice, FIELDCAPTION(“Document Status”), “Document Status”::Approved); I need to display the string ‘Invoice’ and ‘Approved’ in the error, but the system display the number. I tried with FORMAT but does not work. How can I do this? Thanks Marco
If you want it to always say Invoice and Approved why do you use this instead of hardcoding it???
ERROR(‘When %1 is invoice then %2 must be approved’, FIELDCAPTION(“Document Type”), FIELDCAPTION(“Document Status”));
Because I need to use the same message in not less than 10 situations in which the “Document Status” has not always the same value… Marco
Also “Document Type” changes, so the possible messages to display are a lot…
You need to assign the value to a dummy record before like: Rec2.“Document Type” := “Document Type”::Invoice; Rec2.“Document Status” := “Document Type”::Approved; ERROR(‘When %1 is %2 then %3 must be %4’, FIELDCAPTION(“Document Type”), Rec2.“Document Type”, FIELDCAPTION(“Document Status”), Rec2.“Document Status”);
quote:
ERROR(‘When %1 is invoice then %2 must be approved’, FIELDCAPTION(“Document Type”), FIELDCAPTION(“Document Status”));
Originally posted by marq - 2006 Mar 09 : 12:11:20
nooooooooooooooooooooooooooooooooo [;)]