CONFIRM/MESSAGE/ERROR

I need to display a message to the user and get a confirmation as to the course of action to take. I suppose we can use the CONFIRM command for this. But if I use CONFIRM, I can only display one text message. I am unable to use it like MESSAGE or ERROR commands where we can use %1, %2, etc. to embed variable values in the text. Is there a work around for this? I can use a form to display all that I need to and then provide buttons for the user to click to make their selection of Yes or No. But I want to keep this as the last option. Pari Smasundaram.

IF CONFIRM(‘Item No. ’ + Item.“No.” + ’ is invalid.\Do you want to continue?’) THEN Chris Krantz NCSD,NCSQL,MCSD,MCSE Microforum Inc. Toronto, Ontario, Canada

CONFIRM works just fine with %1, %2, etc. to substitute values.


IF CONFIRM('Item No. %1 is invalid.\Do you want to continue?',FALSE,Item."No.") THEN
 

quote:


Originally posted by Jack Reynolds: CONFIRM works just fine with %1, %2, etc. to substitute values.


IF CONFIRM('Item No. %1 is invalid.\Do you want to continue?',FALSE,Item."No.") THEN
 

Thankyou. I tried adding the variables before the FALSE/TRUE. Pari Somasundaram

Hey there ! I have a similar problem. Here is what I wanna do : With Confirm I have 2 options, Yes or No. Is there a way to Use Confirm with more Options, or maybe is there another command which does the Job ? I wanna have a popup which gives me the freedom to name my options. Like : What do you wanna do ? Option Buttons : Case 1 ; case 2 ; Case 3 and so on. The “answer” should be postet back to the system where I can use it to go on. Does anybody have an idea ? Thanx, Christian

Chris: Try STRMENU (see below)! Andre Petzke From the ATTAIN - Help STRMENU Use this function to create a menu window that displays a series of options. OptionNumber := STRMENU(OptionString [, DefaultNumber]) OptionNumber Data type: integer The number of the menu option the user selected. If the user presses Esc to exit the menu, the system returns zero (0). OptionString Data type: code or text constant A comma-separated string. Each substring in OptionString denotes an option on the menu. The string can be a multilanguage enabled text constant. DefaultNumber Data type: integer Use this optional parameter to determine a default option, which the system highlights. The system numbers the options 1, 2, 3, 4, and so on. If you omit this optional parameter, the system uses the first option (1) as the default.

Bearing in mind that STRMENU doesn’t allow you to put any text other than the actual options - so you can’t put any leader text such as ‘Please select one of the following…’ or whatever. That said, I’d love it if someone could prove me wrong on this.

Kristian, you are right. Maybe you can show a message ‘Please choose … in the following box!’ before you call STRMENU. bye Andre Edited by - andre ddb on 2002 Jun 06 15:28:00

Thanx everybody ! That´s exactly what I was looking for :wink: Chris