Checking Role and Access Rights
Application Type

Hi appreciate your advice on this matter

I had created a training module which allow employee's manager to create learning objective for employee. In the learning objective, manager will also assign an instructor to guide the employee to achieve his learning objective.

When user hit the main page, base on his loginid , the application will do a check again the record register in the system like below

If loginid = instructorid then role is Instructor

If loginid = employeeid then role is employee

if loginid = managerid then role is manager

Initially in my default screen , i use fetch data from other source to do the check for the above role. But i realised that using this method , the check cannot be completed as i realised the on after fetch the result are all false.

I switch to using OnInitialize to do the check ; which i had the following

Inside the UserValidation ;

Using on OnInitialize work but there is this performance warning that i had concern ;

'OnInitialize' contains accesses to the local storage or server, which delays the screen's render. To avoid performance issues, use Aggregates or Data Actions instead.

Can someone help me understand why fetch data from other source will not work ?

Thank you in advance

Hi Jerah,

You can create two data actions to handle this scenarios. You can use first data action to check roles and fetch property should be at start.

You can set fetch property of Second data action as only on demand and call this on On After Fetch event of first data action.



Thank you i will try it out your suggestion

Please find the attached sample OML.


Thank you it work as per your suggestion

Hello, may you share your oml file? 

Our community will help you easier if you share your oml ..

Best Regards,

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