work only one time at UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 11:50 PM
I want the "Test" button UI action to work only once even if I press the "Test" button with multiple checks as shown in the image.
How do I set up the UI action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 11:52 PM
test UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 12:01 AM
1. Not sure what the Test button does, but if it performs some action on the record, you might need a new field on the table on which UI action is perfomed.
2. This field will act as a flag, which will also get updated when any action is taken on the records.
3. You can check for the flag from UI action and only perform the required action on the records for which the flag is not set.
4. You may reset the flag after few hours or days if that use case needs to covered.
5. If the record is supposed to be updated only once in its entire lifetime, then you will need a flag to monitor the update.
If you want to allow updating of records after a period of time, you can also utilise the updated field.
1. Check if the record is updated before a certain time period, if not, allow the UI action to perform the operation.
If you feel this has helped you a bit, you may mark the answer as helpful or accept it as a solution.
Regards,
Pranav Thanedar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 12:14 AM
Hello @RyoyaFukuda ,
I am not sure what your final idea is but I assume that you are looking for something like this:
g_list.getChecked()
https://docs.servicenow.com/bundle/vancouver-api-reference/page/app-store/dev_portal/API_reference/G...
you need to call this in your client-side execution of the UI Action.
Hope that this helps you!
If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.
All the Best,
Stefan