Add Cancel button to "Input Dialog"

Hi all.

The user need to be able to cancel the process instead of entering a value and continue it.

Regards,
Marco

Hi @MarcoM,
User can just click ā€œXā€ to cancel:
image

Thanks Pablito.

But as ā€œinterceptā€ the X click?
Because if I click X, the process it continues.

Regards.
Marco

You can use Custom Input activity and define your own action based on java script.
Example here:

Hi @MarcoM,

In place of input dialog box use message box

Hi varunk.
This is not the best way.

I have this input dialog.
In this moment I need 2 options:

  1. Insert the code and click ok
  2. Cancel the procedure and stop workflow

Dialog1

@MarcoM

In that case, why donā€™t you identify those option with itā€™s code value like, ā€œEnter VIP Access code or Robot will be stopped if it is blank.ā€

J,

1 Like

Hi @MarcoM,

For that input dialog box properties
see name as options,there you can pass how many you want like as you said you want two
Ex - {ā€œOKā€,ā€œCancelā€}
Pass like this it will appear

Hi,
Iā€™m reviving this old post.
If you use {ā€œOKā€,ā€œCancelā€} in properties ā€œOptionsā€ than you are loosing the text input field.
You can use Form Designer to create multiple Buttons. https://docs.uipath.com/activities/docs/form-activity.

To further clarify the topic of this thread, Iā€™ll compare the Message Box and Input Dialog Box activities to explain more thoroughly what the problem is.

The Message Box activity, as you see on the left in the screenshot below, has an Input option for its Buttons. These options include ā€œOkā€, ā€œOkCancelā€, ā€œYesNoCancelā€, and ā€œYesNoā€. When using this activity, you can establish from the very beginning what Buttons that activity will have. You can store the value of the selected Button in a variable for later use if you wish, as indicated by the ā€˜ChosenButtonā€™ Output field at the bottom of the list in the Properties window. I have used this functionality multiple times with this activity for some of my processes and it has been very useful.

Next, the Input Dialog Box activity, as you see on the right in the screenshot below, does not have an option for Buttons within its Input section. Additionally, it does not contain an Output to store the variable of the selected Button like the Message Box activity does.

Therefore, as @MarcoM pointed out earlier in this thread, if you select the ā€˜Cancelā€™ button (the ā€˜Xā€™ in the top right-hand corner of the Input Dialog Box pop-up while your process running) the process will continue to the next activity. That should not be happening, which is the problem. In this particular use-case, the whole point of the ā€˜Cancelā€™ button is to terminate the activity and stop the overall process that is currently running without proceeding any further.

Not having the same Button options as the Message Box activity is the underlying issue here because we donā€™t have the ability to establish an alternative behavior we want to get out of the Input Dialog Box activity. Between these two activities in the most recent version of UiPath Studio, if we want to stop or abandon a process after it has been launched, we can do so with a Message Box. We cannot, however, with an Input Dialog Box.

That has been frustrating to deal with. Iā€™ve been trying to find a workaround for this issue over the last couple months and nothing I have tried is working, at least for my particular needs. At one time, I thought I was using this activity incorrectly, but when I started looking deeper, I recognized this functional limitation.

My question: How is it that the Message Box activity was created with an option for Buttons and a corresponding Output, but the Input Dialog Box activity was not? They are both simply a form of a pop-up box; they function almost exactly the same way. Why was this functionality left out of the Input Dialog Box activity? Thatā€™s what Iā€™d like to find out.

Does the UiPath community have a resource for suggesting or submitting requests for features or enhancements to the UiPath platform? Iā€™m a bit surprised, given this thread was started over a year ago, that more hasnā€™t been done to address this. I think this is a much needed update.

4 Likes

Very well explained Jonathan. That is the problem. I am in the same annoying situation. I want a Dialog box, where someone can enter a password with the option of two buttons (Ok and Cance). I am happy that i have read your post. Otherwise, like you, I would have wasted a lot of time on research. Nevertheless i will try to solve it.

hi, its 2023 now. did anyone manage to solve this? is UiPath going to do something about this?