On User Input script executed at On Update

On User Input script executed at On Update


Initially I thought that  the problem is related to a single application belonging to one of my clients, I reported it to support a few days ago, but it seems that it was not even understood. 

I discovered that the problem is in fact a generic one, not at the application level, probably introduced after a recent update.

The fact is for some fields, I did not test for all kinds of fields, On User Input is executed also at On Update for a field.
See a sample application as example (it is also shared to support)


The script from at user input of the field  Refresh_Location is this

  1. if (input.Refresh_Location)
  2. {
  3.     clear Location;
  4.     newlist = {"London", "San Francisco", "Amsterdam"};
  5.     Location:ui.add(newlist);
  6.     input.Location = "London";
  7.     input.Refresh_Location = false;
  8. }

Note that clear Location; and  Location:ui.add(newlist); are not allowed action at on Update, if you write the same script at On Update  you'll get errors.
'hide | show | enable | disable | clear  ' can be used only in 'on load' and 'on user input' actions
'Location:ui.add()' is not supported.
But in our case the script above is executed without problems, even if at on Update there is no script.
If I put some script at On Update, it is not executed, but the script from on User Input is executed instead.

This seems to me a very serious problem, because in some cases can broke an existing functionality, and I want to warn developers to check the instances where On Update script for some fields is important to be executed.

Regards,
George