[APPROVED] 'Apply' option for Action buttons

I often find myself playing with the code for an action button, and I’d like to make a change, and test the effect, without having to close the editing window.
At the moment, I have to click ‘Update field’, test the effect, and then re-open the script editing window to continue editing.
Can we either have a button that accepts that the changes (without closing the window) or, even better, make it so that any changes to the script are automatically applied (and reverted only if Cancel is chosen).


Yes this would be a very useful feature, +1

I’m curious as to how exactly the improvement can be made.

Assuming you are not going to the app settings to then edit the button from there, only to navigate back to an entity. I often create button, go to an entity, click the ellipsis, and edit from there instead.

If you have scripting window open, you would in most cases have to close to click and see the effect, or in the least just the latter.

The alternative is then to have two windows/tabs, in which case you can click just “Update” then click the button in the other window without the need for reload or anything.

Actually, I do usually edit the button from the app settings, and I usually have two browser tabs open, one for editing and one for clicking the button, switching between them with Ctrl-Tab.
Anyway, irrespective of where the scripting window has being opened from, it is annoying that ‘Update field’ causes the window to close. I want to edit (in one browser tab) and test (in another) and clicking ‘Update field’ -> ellipsis -> ‘Edit’ after every change is annoying.
I’d just like to click once after making an edit (or ideally not at all :slight_smile:)

There’s loads of dialog windows in SW that have ‘OK’, ‘Apply’ and ‘Cancel’ and that’s how I thought it might be made to work.

Ah yes, I forgot clicking “Update” closes the popup. It’s easy enough to close by clicking an X/Cancel, or just anywhere outside the modal, so simply not having it auto-close seems like an easy fix.

Just FWIW I totally understand why ‘Update field’ closes the popup for all the other field types, so it kinda makes sense that the behaviour is consistent. It’s just that I write my action buttons scripts fairly iteratively, so it needs to be the exception imo.

We were going to add “Test” button, but did not get into it. Hope to add it in near furure.


Right now, this is the best workflow I have to write and debug a Button script:

  1. Edit the Type
  2. Edit the Button field
  3. Paste in the new script source (copied from my external editor)
  4. Save the Button (which closes the editor)
  5. Switch to a tab where an appropriate entity view is displayed
  6. Click the script Button on the entity
  7. Check console log for debug output
  8. Go make changes to script in external editor and copy new script
  9. Go back to other tab, and repeat from Step 2

This is quite laborious. It would be faster with a simple change:
Allow Shift-Clicking the script’s “Save Button” button to save but keep the button editor open.