Troubleshooting
Expressions
Available Roles Filter Expressions Not Loading Roles
4 min
this document explains why availableroles expressions may not return any roles in activate version 8, and how to configure the expression correctly overview in activate version 8, availableroles expressions are evaluated differently depending on whether the expression is resolved before being passed to the role selector if configured incorrectly, the role picker may load no roles at all cause when an availableroles expression is defined without explicitly passing it through as an expression, activate evaluates it immediately and passes the resolved collection into the role selector this prevents the selectrole control from applying the expression logic as intended, resulting in an empty role list resolution prefix the availableroles value with an @ symbol this ensures the expression itself is passed to the selectrole control, rather than the resolved results behaviour considerations when using this approach, be aware of the following behaviour the expression returns all roles that have the specified parameter set child roles are also returned, regardless of whether the parameter is set on the child this can result in duplicate or unexpected role entries when using hierarchical role structures because of this behaviour, this approach is only suitable when roles are organised in a flat structure alternative for nested roles if a nested role structure is required, use the filter property on the selectrole control instead of availableroles support for filtering nested role structures was improved in activate version 8 2, and later versions handle this scenario more reliably summary to ensure availableroles expressions load correctly in activate version 8 prefix the availableroles expression with @ use a flat role structure to avoid duplicates use the selectrole filter property for nested roles in version 8 2 and later