371
Views
5
Comments
Solved
Cancel Confirmation Message 
Question

Hei everyone,


I want to show confirmation message when you click a cancel button, but i want it to pop out only if you edit or change something
i try to make a variable called "Changed" with default value=False and in the input field on change property i make an assign logic Changed = True whenever it's OnChange but it's not working.

Thanks,


Eric



2020-02-28 09-46-54
Eduardo Jauch
Solution

Hello Eric,

How are you "using" this changed variable?

Did you tried to refresh the button (On Change actions will be called with Ajax Submit)?

In the confirmation  message you put something like:

if(Changed=True, "Your Message Here", "")

The refresh will than set or remove the message. With the message the confirmation popup will open, otherwise it will not.

Cheers

UserImage.jpg
Eric Gunawan

Thanks everyone :)

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Eric,

Buttons and Links are created in the HTML page right after the Preperation has run, including any confirmation message. This means that if, right after the Preperation, your "Changed" Variable is True, the message will always be shown, and when it's False, never. To solution to get the behaviour you want, like Eduardo said, is to Ajax Refresh the Button or Link when the Changed Variable changes. So if you have e.g. an OnChange Screen Action in which you set the Changed Variable, you need to add an Ajax Refresh of the Button.

2019-12-07 10-53-52
Ajithkumar Radhakrishnan

Onchange event after assigning the value add ajax refresh of that Cancel button. If it is not working just share your screen

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

That's what I already said Ajith ;).

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.