The message() command directs the POS to display a message to the user. Generally this message is displayed using a popup window of some kind. Messages are expected to be interupting in nature and require some sort of action from the teller. If you are wanting to display text on the screen as background information see the Total() or text() directives for User Interfaces
If the message command is used inside a PosScript, the button selected by the user is returned to the script
Command Overview
message(group,member)
Read the message text from message.txt files and display this text. The use of numbered messages allows language specific messages to be displayed.
ExamplePosCommand to display message message(1,22) Value in message.txt file 1,22,,,,,Welcome. Let's start selling! Value in message_de.txt file 1,22,,,,,Gruss Gott. Fangen wir zum Kaufen an!
The POS will automatically select the message_de file if the teller has expressed a preference for german, or the complete lane is operating in german language mode. If message numbers are not translated, the system will fall back to English
The "group" parameter indicates a set of words relating to a specific area. Customers can provide their own messages by using Group 1. Member numbers must be positive integers greater than 0.
See below for more information on message files
If the POS is in designer mode, numbered messages will automatically include a "help" button, that will display the call stack of where/how this message originated. It shows PosScripts, line numbers and initial button clicks. It is providing help on where the message came from, not help about the message itself
message(99,N,Text)
To quickly display simple messages the group 99,1 through 99,5 can be used. The 5 forms all display the message Text, but alter then icon displayed:
- 99,1 - Displays text with no icon
- 99,2 - Displays text with a question mark icon
- 99,3 - Displays text with an information icon
- 99,4 - Displays text with a warning icon
- 99,5 - Displays text with a stop icon
Example
message(99,4,This customer is on stop credit. Cash Only) message(99,3,Please advise the customer this item cannot be returned once purchased)
message(speak,Text)
Instructs the POS to speak the message. The system does not interrupt the user and a response is not collected as there is no button to press
Example
message(speak,Fieldpine rocks!) message(speak,Ow! Please don't slam the cash drawer)
message(sms)
Contact Fieldpine before use. Allows suitably configured systems to directly send SMS/Txt messages to customers. The default form of this command displays an interactive SMS entry screen
Message Files
Message files are simple text files containing the group/member numbers and the text to display. When the POS searches for a message it uses the following sequence. It stops on first successful match
- Get the list of Teller languages, if any.
- Scan the file message_user_XX.txt for each teller language (excluding EN - English). This is a site supplied and managed file
- Scan the file message_user.txt This is a site supplied and managed file
- Scan the file message_XX.txt for each teller language (excluding EN - English). This is a Fieldpine supplied and managed file
- Scan the file message.txt This is a Fieldpine supplied and managed file
The following language codes are defined.
- en - English.
- fr - French
- de - German
- sp - Spanish
- pt - Portuguese
- mg - Malagasy
- my - Malay
- bs - Indonesion Bhasia
- no - Norwegian
- pa - Punjabi
- da - Danish
- th - Thai
- md - Mandarin
- iw - Hebrew
- wo - Wolof
- en64 - New Zealand Slang (used for testing)
Within message file, each line has the following format
Group,Member,,PrePosC,PostPosC,mbtype(XXX),Text
Where group/member are the reference numbers (Customers should only use group #1). PrePosCommand and PostPostCommand are optional PosCommands to invoke before and after the message is displayed. Using PosCommands here is rare and may be removed in a future update.
The mbtype() parameter allows you to alter the appearance of the message window.
Choose one of the types { none, warn, stop, info, question } to select the overall style of message box.
You may then apply one of the following to select buttons { ok, okcancel, abortretryignore, yesno, yesnocancel, retrycancel }
If you have multiple buttons, you can then select which button is preselected with { but1, but2, but3 }
Finally, you may specific { systemmodal } if you wish the message to block all operation on the computer
Examples1,22,,,,mbtype(info),Example Message 1,23,,,,mbtype(stop yesno but2),This customer is underage. Sell item anyway?
The PosCommand "message(1,23)", using definition above will display the following
Customising the Message Display
If the setting MessageViaBrowser=1 is set, the POS will create a popup window to display the message in browser window. It loads the url/file prompt_messagebox.htm from the POS folder. This allows you to highly customise the message and include HTML style elements. You can explain messages more fully, provide links to help.
Sites wishing to customise messages in this manner should refer to the file prompt_messagebox.htm for further details