Page 1 of 1

Error Message with substitute variables

Posted: Tue Jul 15, 2014 10:43 am
by Alanjr
We use error messages with substitute variables as in the following:
RPG CODE
Message ID  Severity  Message Text          
 BC00017        0     &1 cannot be blank
Is it possible to display error messages using the error messages property with substitute text? When I try and enter an error message ID with substitute text I get the error "Message Text and Message Id are mutually exclusive. You may not select them both".

Thanks,
Alan

Re: Error Message with substitute variables

Posted: Tue Jul 15, 2014 12:07 pm
by robhathome2
Random guess - should you not use the 'Replacement Data' field and bind it to your field?

Re: Error Message with substitute variables

Posted: Tue Jul 15, 2014 2:15 pm
by Scott Klement
That's correct... use Message ID, Message File, Library & Replacement data.

"Message Text" is designed for applications that do not want to use message files, but instead want to just pass a string from their programs. "Replacement Data" is for filling in the substitution data in a message description.