RF terminal vs. BEEP

Michiel

New Member
We use Progress to use some RF terminals. When the user does something wrong you can display a message on the terminal. And in case of f.e. an character is typed in a number field a BEEP is given.
Question: Is it possible to give a BEEP with an error message every time (so not by Progress but programmed in the code)?

Regards,
Michiel

-------------------------------------------------------------------------------------------------------
Let me explain my problem with an example.

Our client is using an RF terminal for orderpicking and replenishment (in a warehouse system).
Therefore they have to scan (or enter) several barcodes of articles and locations.
When they enter a character in integer field a BEEP is given by Progress.
When they scan an article or locations which is a correct article or location in the system but the wrong article or location at that moment then we give an error message, but Progress doesn't give a BEEP in that case. Because the client doesn't look on the RF scanner all the time they don't see every error message. When we can give a BEEP than the client will be noticed that something is wrong.
So that's the BEEP we want.
I don't think MESSAGE VIEW-AS ... will help, that for the GUI part of Progress. Those scanner are chracter based and has a small screen (20 columns, 9 lines).

I hope my problem is more clear now and that someone can help me with it.

Regards,
Michiel
 
Yes if I am understanding your requirement, what you would like is very simpl.

For Progress GUI, example syntax:
/* set cError to required error value */
MESSAGE 'What ever error'
VIEW-AS ALERT-BOX ERROR TITLE cError.

This is the standard error alert-box for a GUI / Windows environment.
The OS will supply the required beep alert.
The variable cError is used to give the user feedback - you can store whatever message you like in here!!!
 
Re: 100% wrong answer.

You obviuosly do not know the 4GL.
The answer I supplied is 100% CORRECT - get some 4GL / ABL training & STOP criticising.
 
The original post specifies an RF terminal. I could be wrong but SFAIK those are usually character devices, so a GUI programming solution is questionable. MESSAGE VIEW-AS ALERT-BOX is portable though.

But if the question is truly about adding a message when input validation fails then these answers have missed the point. The BEEP already beeps so sending chr(7) and the like isn't really needed. The original post wants to add a message when the input error happens. Not later. The given example is when an alpha character is entered in a numeric field.

I am not aware of a general purpose solution but I believe that something like this code does what is requested for an INTEGER field:

Code:
define variable i as integer no-undo.

update i editing:
  readkey.
  apply lastkey.
  if go-pending then leave.
  if lastkey < 48 or lastkey > 57 then
     message substitute( '"&1" is invalid for INTEGER input.', keyfunction( lastkey)).
end.

Obviously it would be a PITA to recreate all of the automatic input validation for more complex data types. EDITING blocks are also deprecated, incompatible with event-driven programming and generally considered bad practice.
 
Let me explain my problem with an example.

Our client is using an RF terminal for orderpicking and replenishment (in a warehouse system).
Therefore they have to scan (or enter) several barcodes of articles and locations.
When they enter a character in integer field a BEEP is given by Progress.
When they scan an article or locations which is a correct article or location in the system but the wrong article or location at that moment then we give an error message, but Progress doesn't give a BEEP in that case. Because the client doesn't look on the RF scanner all the time they don't see every error message. When we can give a BEEP than the client will be noticed that something is wrong.
So that's the BEEP we want.
I don't think MESSAGE VIEW-AS ... will help, that for the GUI part of Progress. Those scanner are chracter based and has a small screen (20 columns, 9 lines).

I hope my problem is more clear now and that someone can help me with it.

Regards,
Michiel
 
In old days we used triggers to handle these things.

Code:
On leave of pos_field in frame frame-a
do:
   bell.
   message 'Wrong location'.
end.
 
Ok, now that you have clarified it seems to be just the opposite of what I thought you meant. C'est la vie ;)

chr(7) is the ascii character that usualy causes a beep.

The portable way to do it in the 4gl is to use the BELL statement. You already have some code that detects the error and outputs a message so you just need to add a BELL statement. Like so:

Code:
message "Error message text.".
bell.
 
Back
Top