Link to destination firing early in list, solved by dummy data broker UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 02:39 AM - edited 09-13-2023 02:41 AM
Desired outcome:
-I had a UXF client button that would do some changes to the checkboxed incident and then open the checked incident in a new tab. I was using UI builder and events/data resources to accomplish this and the "link to destination" event to open the incident.
actual outcome:
-the "linked to destination" would fire when the checkbox was clicked and not after the button was clicked.
solved by:
By using the data resource "Dummy data broker". Can be found in UI builder by clicking data resources > +add >cmdb workspace > dummy data broker (see image)
i created a client state boolean called hasClicked with false as default value. Dummy data broker would listen to hasClicked
then use @Data.dummy_data_broker_1.output.dummyStateThatChangesToForceANavigation as a client condition on "Link to destination" = if((@data.dummy_data_broker_1.output.dummyStateThatChangesToForceANavigation),true,false)
You might want to set hasClicked to false again after, in that case use Events inside dummy data broker, on fetch succeeded, add event handler, Update client state parameter (List), set hasClicked to false again.
This workaround worked for me, it might help someone else.
Have a good day!