Not Getting all the data from source block

I have this list which has an onclick attribute that will change the SubPermission based on permission, the right column was list from the source block.

All in all this is what it looks like

In the Timesheet part even if I didn't change the toggle it will save in the db after I click the save, I'm using OnAfterfetch to trigger the event in my source block. But in the Report tabs if I didn't change anything in the toggle the event will not trigger. What should I supposed to do so that even if I dont trigger the event in the other tabs it will still put in the append. I attached the OML if the question is not clear.


Hi @Romeo Sandrino ,
This is happening because you are filtering data in aggregate "GetSubPermissionsByPermission" with the local variable "PermissionFilter".
This variable is assigned only if you click on the sub-menus (Timesheet, Reports, User management).
If you want all the data irrespective of PermisionFiter, You will need to update your existing logic in such a way that you can get all the data without clicking on any submenu.
You can try this updated filter in aggregate "GetSubPermissionsByPermission".

If(PermissionFilter = NullIdentifier(),True,SubPermission.Permission = PermissionFilter)

Please let me know if you have more queries.


It is working the new filter but the user need to click the sub menu in order to append in the list. I'll try to find way to save it without the user needing to click the sub menu, Thanks

Do you want it to append after a click or without a click?
In both the scenarios above filter will work, the only thing you need to take care to checking for any duplicate records.
e.g, user just redirected to the page all the data will automatically appended, and after that user clicks on any of the sub-menus the data will be appended again(To fix this issue you will need to remove the duplicacy or check deplicacy to bypass the append).

@Romeo Sandrino Without clicking on any submenu it will give result like this:-

Are you expecting this type of result or anything else you wanted?

Using the Filter that you provided 

If(PermissionFilter = NullIdentifier(),True,SubPermission.Permission = PermissionFilter) 
It still give me this design, If I click save without clicking anything in the Permission tab, it will save all the permission level in the timesheet but not in report, in other case if I click the Reports Sub Menu even if I dont change the toggle, it will save the PermissionLevel both timesheet and Reports
Can I somehow save the Timesheet and Report Permission Level without clicking the sub menu?

Yes, You can check this updated OML.
If without clicking any submenu, directly clicking on the save button it is saving 6 records.
But you will need to manage the screen records which I have attached in the above comment, I think it is showing duplicate records but not sure about business logic.
So you will need to tune the logic as per your requirement.

Please let me know if you have more queries.



Hi @Romeo Sandrino ,
Please find the updated OML for your reference.
Now UI issue is also fixed.

Hope this OML solves your issue.



Hi Romeo,

I checked your OML and it works exaclty as designed. When I click on the Reports tab, the data is passed and can be saved.

However, if you want to get all the data from your tabs without clicking on them, you need to implement logic, not dependent on user actions. 

Another option is to create records only for changed permissions and consider them default if no database rows exist.

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