cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

On-edit script should be able to return feedback to user.

On-edit script should be able to return feedback to user.

When on-edit (or on-demand) fires from UI, I want to control the banner that is displayed to the user, like validation scripts.

 

Scenario: user expected on-edit to do something.

However the script detected a problem, and could not proceed. It sets a message field, but the user did not notice this.

 

Currently, the banner is GREEN. The user assumes the trigger ran OK, but actually nothing happened.

 

I want to give feedback to the user:

  • RED – like current error behaviour, but specify a message string (item not saved)
  • ORANGE – Script completed but “some message”.
  • GREEN – Script completed and “here is a message”.

 

 

Suggestion:

 

 

 

 

var messages = [];
messages.RED = 'Some error message';
//messages.ORANGE = 'Some warning message';
//messages.GREEN = 'Some OK message';
returnValue(messages);

 

 

 

 

 

Nothing returned = current behaviour, for backwards compatibility.

1 Comment
john.denner
Advocate

I wanted this for so long. The only suggestion I might make (and it's very granular) is to use something more like messages.alert(text or var), messages.warn(text or var), and messages.success(text or var). Or perhaps something like Bootstrap's implementation (visually, not technically) of this functionality. Alerts · Bootstrap v4.6 (getbootstrap.com)
Either way, the goal is to be more proactive in error handling and improving user experience.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea