Hello,
ich have two arrays:
first one: pageroles, second one: userroles
now i want to check in a formula, if the user has the necessary role for the page.
if i use contains(arrayuserroles;valuepagesroles[0]) works for the first value from pagerolesarray, but not for more (and a page can have more then one role).
how can i check, if one of alle values are in the first array?
Is this possible in a formula or do i need to make it in a workflow?
i found this custom javascript:
the first variable is pageroles, the seconone is userroles
return variables[‘96ea39b7-9788-4f3e-a832-6dc56c2f6889’].filter(x => variables[‘fdee6cbe-9a64-457f-8127-50c010da1ea3’].includes(x));
but didnt work…
thanks for help.
stefan