33
Views
3
Comments
Solved
If Onchange not trigger
Question

Continuation of my problem, after solving the partial problem in the custom role that I am doing, I noticed that only if I change the toggle will the list will append since I'm only triggering the event in the source block.I created a server action to have a default value if the event is not triggered but I don't know how to check whether the event or trigger or not


as well as I also need to make sure that the list of the PermissionLevel in the source block that if not triggered should be still part of the Append, it has a default value of false and deny in the db, but I don't know how to put it in the append if not triggered.
I attached the OML if my question is not clear. But to compress all my question, I want to know how to add in the append those event that is not trigger and if there no trigger event at all I want to use the default server action value as the value that will save in the Db.

Roles.oml
Solution

For the above suggestions you will need to make a few other changes:-
1.) Need to change the parameter of the event/event handler from PermissionLevel to PermissionLevel List.
2.) After you change the parameter to list you will need to update your existing logic of the event handler "PermissionLevel" screen action of NewRole to handle the list of data.

Please let me know if it helps you.

Roles_V1.oml

HI @Romeo Sandrino,

As per your current implementation, the event will only trigger when you change the toggle button.
If you want to call that event by default to append all the available lists to the parent screen, you will need to call the existing event in a new screen action and call the action on the event "on after fetch" of the aggregate "GetPermissionLevelsBySubPermission".
So that when you have all the data ready event will send the data to the parent.

Please let me know if you have more queries.

Regards,
Anubhav
 

Solution

For the above suggestions you will need to make a few other changes:-
1.) Need to change the parameter of the event/event handler from PermissionLevel to PermissionLevel List.
2.) After you change the parameter to list you will need to update your existing logic of the event handler "PermissionLevel" screen action of NewRole to handle the list of data.

Please let me know if it helps you.

Roles_V1.oml

Hi, thanks, I follow your instruction in OnAfterFetch, but I tried using List Variable and AppendAll to hold my data before passing to the parent screen. Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.