Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add carriage return in MsgBox when in Script?

Hi

Trying to add a carriage return for the long error msg that i have in script and cannot seem to get it working.

I'm new user and is using version 11.2 SR5

Below is what I want to show:

Missing Source File: InternalHedges.qvd. 

The file is incomplete, use with caution. 

Please contact IT Team for assistance.
email@company.com

this is what i wrote for my script:

Test:

Load
MsgBox('Missing Source File: InternalHedges.qvd. '

&chr(10)&'The file is incomplete, use with caution. '
&chr(10)
&'Please contact IT Team for assistance. '

&chr(10)&'email@company.com',
'MISSING SOURCE FILE', 'OK', 'ICONEXCLAMATION')
autogenerate 1;
DROP TABLE Test;

Any help/tip is greatly appreciated!  Thanks!

Louise

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Just create the line breaks directly in the script:

LOAD

MsgBox('Missing Source File: InternalHedges.qvd.

The file is incomplete, use with caution.

Please contact IT Team for assistance.

email@company.com',

'MISSING SOURCE FILE', 'OK', 'ICONEXCLAMATION')

as Test

AutoGenerate 1;

View solution in original post

10 Replies
swuehl
MVP
MVP

Just create the line breaks directly in the script:

LOAD

MsgBox('Missing Source File: InternalHedges.qvd.

The file is incomplete, use with caution.

Please contact IT Team for assistance.

email@company.com',

'MISSING SOURCE FILE', 'OK', 'ICONEXCLAMATION')

as Test

AutoGenerate 1;

Anonymous
Not applicable
Author

This works:

Load
MsgBox('Missing Source File: InternalHedges.qvd.
The file is incomplete, use with caution.
Please contact IT Team for assistance.
email@company.com',
'MISSING SOURCE FILE', 'OK', 'ICONEXCLAMATION')
autogenerate 1;

Not applicable
Author

thanks!  I didnt know it was that easy.  Again many thanks!

Anonymous
Not applicable
Author

Sometimes things are easier than they appear

Not applicable
Author

thanks for the answer!

this is my first time using the forum so I am not sure how to assign "Correct Answer" to both people.  It seems that I can only assign one correct answer point out per question.

thanks!

Anonymous
Not applicable
Author

Only one answer can be marked as correct.  Stefan was faster, so he deserved the credit more than I do.

swuehl
MVP
MVP

Thanks 😉

I am just wondering if anybody ever used the function as shown in the HELP:

Load

MsgBox('Message 2', 'msgbox', 'OKCANCEL', 'ICONASTERISK') as x, 2 as r

autogenerate 1;

MsgBox() will just return a number indicating which button the user pressed. Hm, maybe to create a questionaire for the operator that reloads the script?

Load

     Food,

     if( MsgBox(Food, 'Do you like ...'&RecNo(), 'YESNO', 'ICONASTERISK')=6,'Yes','No')  as Answer

INLINE [

Food

Spaghetti

Pizza

Falafel

Salad

Ice cream

];

Interestingly, I only get 3 message boxes, every other input records seems to be getting the answer from the previous one.

Lousie, if you want the user to input something useful, there is also the INPUT() function.

Anonymous
Not applicable
Author

It is strange, I get three messages every time on reload, and they are random.  Sometimes the same Food value is repeated.

Anonymous
Not applicable
Author

Works fine if replace RecNo() with RowNo()
(Going to look up the difference...)