hello,
I have the typical help desk application and I can already do filters based on a dropdown (which is based on the status of the request). Now I want to add a filter that adds to it (according to its state) based on a toggle. Depending on the state of this, I want to show or not the elements that are assigned to me (to the person ( isadmin) who is using the app at that moment).
In my gallery, in the "items" section I currently have this code.
***************
If
(isAdmin;
Sort
(Filter(AllTickets;TaskStatus.Value = Dropdown1.Selected.Value );
Created;Descending);
Sort
(Filter(AllTickets;Author.Email = MyProfile.Mail And TaskStatus.Value = Dropdown1.Selected.Value || Author.Claims = MyProfile.UserPrincipalName );
Created;Descending )
)
****************
column sharepoint
thanks!!
regards
Solved! Go to Solution.
Hi @ppblab77 ,
I am not entirely sure on your logic here, and also what value AssignedTo needs to match, but this would be the structure - the bracketing and &&/|| could change depending on the output you need.
Sort(
Filter(
AllTickets;
(
IsAdmin ||
(
Author.Email = MyProfile.Mail ||
Author.Claims = MyProfile.UserPrincipalName
)
) &&
(
!Toggle1.Value ||
AssignedTo.DisplayName = MyProfile.UserPrincipalName
) &&
TaskStatus.Value = Dropdown1.Selected.Value
);
Created;
Descending
);
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @ppblab77 ,
I am not entirely sure on your logic here, and also what value AssignedTo needs to match, but this would be the structure - the bracketing and &&/|| could change depending on the output you need.
Sort(
Filter(
AllTickets;
(
IsAdmin ||
(
Author.Email = MyProfile.Mail ||
Author.Claims = MyProfile.UserPrincipalName
)
) &&
(
!Toggle1.Value ||
AssignedTo.DisplayName = MyProfile.UserPrincipalName
) &&
TaskStatus.Value = Dropdown1.Selected.Value
);
Created;
Descending
);
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
hello,
first thank you. I think you have understood my question very well.
I applied it and I only get an error, but I think I'm on the right track.
incompatible types for comparison. cannot compare these types: record, text
tanks!!!!!🙂
I had just solved it by calling a text type column and cloning it with the low that is triggered when it is modified.
But your solution is much better, in my case it was .email
Thanks friend!!!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
190 | |
52 | |
51 | |
36 | |
33 |
User | Count |
---|---|
268 | |
97 | |
83 | |
68 | |
68 |