Messages Identification

Top  Previous  Next

If you use the auxiliary files to save your users preferences (like when using the "Do not ask again" feature) the system needs to identify each message so it can retrieve the users selection the next time the same message is shown.

 

You may use a global variable to specify the unique ID for each message, like this:

 

NMGLO:DoNotAksAgain = TRUE

NMGLO:DesiredAnswer = Button:Abort

NMGLO:MessageID = 1

CASE Message(LOC:MESSAGE1,'Title',ICON:Hand,Button:Abort+Button:Retry+Button:Ignore)

 

This would be message number 1 in the Messages file.

 

Now, beware. How you handle the identification system is completely up to you. The Message file use an Autonumber ID key (unless you change the default behaviour), so each message new to the system will use the next "free" number inside the file. It is up to you to avoid overlapping of messages with identification against messages without identification.

When a message does not have an ID (the most likely situation), an automatic ID is assigned based on its description (In this example, the LOC:MESSAGE1 variable), considering as much characters as those specified in the "Message" field in the Messages File.

 

If you have messages that show "variable" information, you should consider use this identification feature, otherwise each slightly different message will be saved as a different one.

On the other hand, if you want to Audit the messages to your users (With the audit pack, using FullRecord), you would prefer to not specify a unique ID, or you won't be able to recall exactly what your user saw. You have to decide what is more important to you, you have both possibilities anyway.