So first of all, I retrieve a list of the Tenant User project user roles like: $TenantUser/TenantUser_ProjectUserRole and output it as ProjectUserRoleList.
Then, I retrieve System.UserRole. (I'm assuming all the available roles are in here) I use an XPath constraint: [Name = "TenantManager"] and put the range to First. This way I get the UserRole TenantManager and I output it as UserRole.
Finally, I'm trying to change the ProjectUserRoleList I retrieved, and I'm trying to add $UserRole to this list. This gives me an error:
'The microflow expression is of type System.UserRole but should be of type MTA.ProjectUserRole or List of MTA.ProjectUserRole.'
MTA = MultiTenantAdministration module I'm using.
You can not add $UserRole to $ProjectUserRoleList because they are different entities, right?
The MTA module comes with microflows to help you with the task you would like to achieve. First, make sure you set it up correctly as stated in the documentation https://appstore.home.mendix.com/link/app/80498/ . Use the snippets and microflows in the _USE_ME folder and check how the confirmation buttons on these pages are handling the system user roles and the tenant user roles.
Hope this helps :)