Hello experts,
I want to compare two collections. first collection have user Role matrix, and second collection has Current logged in user groups.
Role Matrix
Current User Groups
Current User Groups
I want to compare Current User Group collection with Role Matrix role column, means want to get list of all roles which current user having in second collection.
how can i achieve this, please help!
Solved! Go to Solution.
On the button's visible property, you can add this formula which will look into the filtered collection and find roles.
"President" in Filter('Role Matrix',Role in 'Current User Groups'.displayName).Role
which is the same as
If(
"President" in Filter('Role Matrix',Role in 'Current User Groups'.displayName).Role,
true,
false)
You can then obviously change "President" out with any role.
You can also drive it using your permission column like this
Not(IsBlank(Find("Approve",Filter('Role Matrix',Role in 'Current User Groups'.displayName).permission).Result))
Where you would change "Approve" to any of the other permissions. This one looks more complicated because your permissions are one text field.
---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.
@EricLott I like your thinking 🙂 just learned a new thing will remember about IN next time^^ Thinking only about one thing if the below formula will be applied on every control it will always be triggered so n number of the controls n number of execution.
Would suggest to store the result in the single var than assign it to visible.
@sachinsoni Eric explanation is great:) hope you will move forward with it.
@365CornerDawid Yes, that's true.
@sachinsoni, It would be best to set a global variable for each check you plan on making.
Set(variableName,variableValue)
Where variableName would be the name you want to give it and variableValue would be one of the checks I showed above.
---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.
Hi @365CornerDawid ,
I have a similar issue in my application.
How can i push the values that are not matching into another collection or append those values to a string.
Kindly advice.
Regards
Srinath
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
184 | |
53 | |
50 | |
37 | |
36 |
User | Count |
---|---|
274 | |
91 | |
85 | |
76 | |
75 |