Write Line vs. Message Box

When is it best to use Write Line vs. Message Box? How are they different?

HI @kcaller

Write Line → Prints a string or the value of a string variable to the Output panel. By default, this activity is also included in the Favorites group.

Message box → Displays a message box with the specified text and button options.

Regards
Gokul

Hello @kcaller

Message box can be used if you need to make a user interaction. For example, you need to show some popup and need to ask user to accept it. In this kind of situation you can use it.
In the modern activity there are option to auto close the message box also.

Writeline can be used to output some results in the output panel. This will help for debugginh

Thanks

Hi @kcaller,

I have a personal bias towards Message Box during development and Write Line or Log Message when I am quite sure of strings to be logged.

Message box ensures that you do not write the strings to your logs, while Write Line and Log Message activities, no matter what will write to your execution logs.

When dealing with sensitive data encrypt it and then use either Write Line or Log Message. When developing if you want to check a value, you can either use Message Box or Intermediate panel to inspect the value you are interested in.

Log message or Write line should be used only when you really want to log the values to execution logs.

great tip!

Thanks that was helpful.

Thank you.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.