Good afternoon,
I would like to ask your help to understand which is the better way to check the actual role with a dataset of roles to open a page.
I create a dataset memory tag where I add the roles I want to be able to open the page.
Then I add this code to the mouseReleased event:
val = system.dataset.toPyDataSet(system.tag.read('myPath').value)
role = system.security.getRoles()
# Convert to a PyDataset
pyData = system.dataset.toPyDataSet(val)
# The for loop pulls out the whole row, so typically the variable row is used.
for row in pyData:
# Now that we have a single row, we can loop through the columns just like a list.
for value in row:
if value in role:
window = system.nav.openWindow('myPage')
Is there a better way to do this with a view to having more page to manage ?
Thanks a lot