Solved

Yes / No Dialog Box

  • 11 November 2019
  • 13 replies
  • 2657 views

Userlevel 3
Badge +10

Is there any way to show Yes/No dialog box in a custom event and perform operation based on user’s response?

 

icon

Best answer by Banu Liyanapathirana 3 December 2019, 14:43

View original

13 replies

Userlevel 7

Is there any way to show Yes/No dialog box in a custom event and perform operation based on user’s response?

 

Unfortunately not. Stopping messages or info messages but nothing that allows user input. 

Userlevel 6
Badge +15

A couple of solutions for you

1. Instead of preventing an action from happening, you could always show information to a user after an action has taken place using CLIENT_SYS.Add_Info - This will not roll back the transaction, but can be used as handy reminders. (Can’t remember the full workings of the procedure, but if I recall it only works with certain LU’s)

 

 

2. Create a checkbox custom field on the record you are modifying called “Override error message” - (by default unchecked)

  • Check in your code if the checkbox is ticked or not - if not then keep the current error message which says “Possible error. Something may be wrong. - Tick ‘Override error message’ checkbox to ignore error”
  • If the checkbox is ticked then upon saving the record the error message will not appear
  • This way you are still forcing the user to have a further action to continue (As long as they don’t tick the checkbox every time to avoid error message)

 

Failing those two options you could always pay for an IFS modification if the requirement was that important

Userlevel 7

Is there any way to show Yes/No dialog box in a custom event and perform operation based on user’s response?

 

Do you have a specific use case you need this for? We could possibly come up with a smart work around for it.

Userlevel 3
Badge +10

I did think there was nothing available except workaround. Right now we have custom enumeration on screen showing options Blank (default) / Yes / No. This value is passed to action. When user takes action first time they are showed error and the message to set custom field value to Yes / No and then take action again.

This time action continues based on custom field values.

Userlevel 4
Badge +8

The basic problem here is that a Custom Event is an Oracle trigger executed on the server. Would be nice to have some client side configuration posibilities. Although with browser based Aurena I guess this is even more difficult ...

Userlevel 7
Badge +30

I did think there was nothing available except workaround. Right now we have custom enumeration on screen showing options Blank (default) / Yes / No. This value is passed to action. When user takes action first time they are showed error and the message to set custom field value to Yes / No and then take action again.

This time action continues based on custom field values.

I think that approach is the best you can come up with, when it comes to “asking the user” in custom events.

 

Userlevel 4
Badge +9

Is there a way to call this prompt?

Userlevel 6
Badge +15

Is there a way to call this prompt?


Not without an IFS modification

Userlevel 6
Badge +13

Is there any way to show Yes/No dialog box in a custom event and perform operation based on user’s response?

 


Can’t you try Client_SYS.Add_Warning method? This will give you two options. Either to continue or to cancel. 

Userlevel 6
Badge +15

Is there any way to show Yes/No dialog box in a custom event and perform operation based on user’s response?

 


Can’t you try Client_SYS.Add_Warning method? This will give you two options. Either to continue or to cancel. 


Have you had any examples where this will actually work?

I’ve tried it loads and can never get it to display

Userlevel 4
Badge +9

I’ve also never been able to get the Client_SYS.Add_Warning working. :thinking:

Userlevel 6
Badge +13

I’ve also never been able to get the Client_SYS.Add_Warning working. :thinking:

 Hi @Jur, @CallumW 

I’m also not able to get this work. This should be handled on the client side in order to get it to work the Client_SYS.Add_Warning.

In normal routines like "NEW", "MODIFY" and "DELETE" the warning messages are only checked at the "CHECK" stage. That is also if the warnings are enabled on the window. However the information messages generated using Add_Info procedure in Client_SYS are always shown in the client.

 

In most of the cases the "CHECK" stage does not do any modifications on the database. Therefore the triggers associated with the Custom Events are not fired. Due to this reason it is not possible to use Client_SYS.Add_Warning calls to break the transactions in Event Actions.

 

So, it should be better to go for a customization/modification.

 

Userlevel 7
Badge +30

Another option that could be used with custom events is to have a “blocking” error raised from the custom event when a certain condition is true, but add a way for users to “say okay” on beforehand. It could be a free field that you are not using, or a custom field, where the user enters “yes” (or whatever). That value is then checked in the custom event and, if it is set, the error will not be raised.

So, it will be like: “I know this error will appear now, but I will write ‘yes’ in this field to force it to proceed anyway”.

 

Reply