Role Check

I would like to conduct the follwoing actions.

Check the user role (if user.role = manager),
excute the first SQL query,
excute the second SQL query

Can anyone suggest what I need to do in the preperation?
Your pseudocode seems ok, so that is what you need to do.

Hi Richard,

The way to do it would be using an IF widget, with the following condition
where CheckAdministratorPermission is a Permission function, in the Scope tree.

Then, if you want to use the query result in the same place (i.e. a Table Records, or whatever), you should have a Local Variable, with type Record List, and the same record definition as the queries output (they must be the same, both of them), and use the Local Variable instead of the Query's record list, in the Table Records or logic you want to execute.

I hope this made it clearer.

Regards, and let us know if this helps.

Paulo Tavares