Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How to show a field value and a message text in a message box

Avatar

Former Community Member

Hi

I have made a message box that shows the value of a text field when a button is clicked. I would like to add some message text to the message box as well, so that my message box will show something like:

You have entered this data: "textField value"

This script works to show the text field value but I cannot figure out how to combine it with an ordinary message box text message. I have tried various combinations of () and “ “ but no luck.

if

(TextField1.rawValue != null)

{

xfa.host.messageBox(TextField1.rawValue

, "Message box title");

}

Kirstine

1 Accepted Solution

Avatar

Correct answer by
Level 5

HI,

I think the code would be something like this

if (TextField1.rawValue != null)

{

     xfa.host.messageBox("You have entered this data:" + TextField1.rawValue, "Message box title" );

}

Hope this helps

Malcolm

View solution in original post

3 Replies

Avatar

Correct answer by
Level 5

HI,

I think the code would be something like this

if (TextField1.rawValue != null)

{

     xfa.host.messageBox("You have entered this data:" + TextField1.rawValue, "Message box title" );

}

Hope this helps

Malcolm

Avatar

Level 3
Level 3

you can use below code:

xfa.host.messageBox("Word  you want to add in start "+TextField1.rawValue

+" Word you want to add in the end","Message Box Title")

Thanks