Messages

From Plex-XML
Jump to: navigation, search

User-Message-Handling in Plex-XML.

Message handling is controlled by ControlOutput_Transaction values that are available in every Plex-XML XML response. As described below there are three types of messages (success, hint/warning, error). Messages including it's parameters can be translated/maintained in the dictionary if you prepare them in the described way.

Translation

Plex code for translation:

ª+1 Seq 
Translate Message
	ª+2 Comment  Cast any paramater you defined in your message to the corresponding allMessage<MessageParm0x> field
	ª+2 Cast  allMessage<MessageParm01>, ControlInput<SessionID>
	ª+2 Comment  Get implementation name and text from defined message
	ª+2 Name  Message: PATTY/Reference not found, allMessage<ImplementationName>, .Surrogate
	ª+2 Text  Message: PATTY/Reference not found, allMessage<MessageText>, .Text
	ª+2 Comment  Prepare and translate message
	ª+2 Go Sub  TranslateMessage
	ª+2 Comment  Cast text to output parameter
	ª+2 Cast  Output/ControlOutput<TransactionMessage>, Message<MessageText>
@@
  • Note that every message that should be translated should have an implementation name.


Message translation.png
Message translation with parameter in dictionary. Message key is the surrogate number.

Plex-XML Transaction-Output-Parameter

XML-Response

ControlOutput_Transaction values that are available in every Plex-XML XML response:

...
<returnvalue name="ControlOutput_TransactionSucceeded" unformatted="1" value="1"/>
<returnvalue name="ControlOutput_TransactionReturnCode" unformatted="OK" value="OK"/>
<returnvalue name="ControlOutput_TransactionMessage" unformatted="Thanks, your changes have been saved." value="Thanks, your changes have been saved."/>
<returnvalue name="ControlOutput_TransactionFieldname" unformatted="" value=""/>
<returnvalue name="ControlOutput_TransactionRight" unformatted="8" value="8"/>
...


Example

Success-Message

TransactionSucceeded = *yes

<returnvalue name="ControlOutput_TransactionSucceeded" unformatted="1" value="1"/>
<returnvalue name="ControlOutput_TransactionMessage" unformatted="your message."/>

Success-message.png


Warning/Hint

TransactionSucceeded = *yes
TransactionReturnCode != *blank

<returnvalue name="ControlOutput_TransactionSucceeded" unformatted="1" value="1"/>
<returnvalue name="ControlOutput_TransactionReturnCode" unformatted="confirm" value="confirm"/>
<returnvalue name="ControlOutput_TransactionMessage" unformatted="your message."/>

Popup-message.png


Error-Message

If the ControlOutput_TransactionSucceeded value is 0 (0=no) the content of ControlOutput_TransactionMessage is shown as error message.

<returnvalue name="ControlOutput_TransactionSucceeded" unformatted="0" value="0"/>
<returnvalue name="ControlOutput_TransactionMessage" unformatted="your message."/>

Error-message.png

Popup

Popup-Message if you set the Confirm-Flag in the format to true:

Popup-message.png

Personal tools