cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AIUYM19
Helper V
Helper V

Invalid argument type when comparing two text values

I have a button on a screen which has the following forumla in the OnSelect property.

UpdateContext({
    galVis:true, frmViewVis:false, 
    dsFiltered:Filter(ds, And(Not(Status.Value="Complete"), Assignee.Email=User().Email))
})

ApowerApps gives me an error on the equals sign between Assignee.Email and User().Email. It throws an error of "invalid argument type." I don't understand why it is throwing this error, because both of those values should be text. The Assignee field in the data source is a SharePoint list item of Person or Group type, limited to a single entry.

 

My goal is to filter the gallery on items that have a status of anything except "Complete" and where the Assignee email address matches the email address of the current user. Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
jhall
Continued Contributor
Continued Contributor

You might try First(Assignee).Email.  Just know that some SharePoint values per users are lists even if you specify that a single value exists.

View solution in original post

2 REPLIES 2
jhall
Continued Contributor
Continued Contributor

You might try First(Assignee).Email.  Just know that some SharePoint values per users are lists even if you specify that a single value exists.

View solution in original post

Thank you. This took care of the error. Smiley Happy Now I have a new problem, but it's a different question about how the User() function works.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,353)