Options

Message Spacing when using CONFIRM

tforshawtforshaw Member Posts: 2
I am trying to create a CONFIRM message with tab-like spacing. That is, I want to list four or five things on the right side of the CONFIRM box and have four or five things on the left side of the CONFIRM box, and I want both to appear to be in tabbed columns.

I've tried using %1 and #1, and the closest I've gotten to what I want is this:

IF NOT CONFIRM('This Employee Number exists in the Kronos Employee Table.\\'+
'Employee No................ #1###########\'+
'Kronos Employee No.........#2###########\'+
'Employee Name.............. #3##############\'+
'Social Security No......... #4###########\'+
'Active Company............. #5##################\\'+
'If this is the correct employee, answer YES below.\'+
'If this is the wrong employee, answer NO below.',FALSE,
dhbKronosEmployee."Employee No.",dhbKronosEmployee."Kronos ID",
dhbKronosEmployee."Employee Name",dhbKronosEmployee."Employee SSN",
dhbKronosEmployee."Active Company") THEN . . .

or

IF NOT CONFIRM('This Employee Number exists in the Kronos Employee Table.\\'+
' Employee No ......... #1###########\'+
'Kronos Employee No ......... #2###########\'+
' Employee Name ......... #3##############\'+
' Social Security No ......... #4###########\'+
' Active Company ......... #5##################\\'+
'If this is the correct employee, answer YES below.\'+
'If this is the wrong employee, answer NO below.',FALSE,
dhbKronosEmployee."Employee No.",dhbKronosEmployee."Kronos ID",
dhbKronosEmployee."Employee Name",dhbKronosEmployee."Employee SSN",
dhbKronosEmployee."Active Company") THEN . . .

If I make everything line in the C/AL code like a DIALOG box, it looks awful.

I know when we use display a DIALOG box, everything lines up nicely using #1, but I cannot make it work with CONFIRM or MESSAGE.

Any help is appreciated. Thanks in advance.

- TF -

Comments

  • Options
    kinekine Member Posts: 12,562
    You need to use %1, %2 etc. to substitute the values into text and zou need to pad the values to needed length for example with FORMAT(Value,-length) - it will create string with exact size of <length>.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.