Hi PowerApps experts!
I am working with a form in PowerApps which contains a people picker field which contains multiple "System Admins". This is a people picker field working with my SharePoint List. If one of the people who has been picked as a System Admin against my SharePoint list's item should leave the company, and their AAD account is disabled, I'd like to be able to highlight this by displaying their name in a different colour.
My idea is to create for the "Color" property of the DataCardValue some syntax that checks the AAD account status. In an ideal world only the name of the disabled account from the multiple accounts displayed in the field would show as a different colour, but I would accept a solution that at least highlights all the names in a different colour where at least one account is no longer active, as I suspect that's realistically the only possibility that can be achieved.
I tested a syntax that seems to work fine against a people column in SharePoint that is single select only - it displays the name of the system admin in red text if the account is disabled and in black text if the account is enabled:
If(Office365Users.UserProfile(ThisItem.'System Admins'.Email).AccountEnabled = false, RGBA(255, 0, 0, 1), RGBA(0, 0, 0, 1))
However, in the instance the 'System Admins' column in SharePoint and the associated PowerApps form is multi select, this no longer works.
Does anyone know if this is possible to achieve somehow? I really appreciate any input / suggestions.
Many thanks!