web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering Tasks for Us...
Power Apps
Answered

Filtering Tasks for User Visualization in PowerApps and SharePoint: Error with Type Conversion

(0) ShareShare
ReportReport
Posted on by 64

 

Hello everyone, I'm trying to filter tasks for user visualization in PowerApps associated with a group in my SharePoint. I have these two lists below, where in UserGroupStatus, all users are listed, and in TB_FORM, the tasks that will be displayed to the users are stored. For example, the task in TB_FORM with ID 1 and that belongs to Group N1 and N2 (there can be multiple groups and multiple users) should appear for all users in the UserGroupStatus list who are associated with these groups. I tried to do this as follows:

In my app, in the OnStart property, I added this code to convert both to the string type:

 


App = OnStart property

ClearCollect(
colUserGroupStatus,
AddColumns(
UserGroupStatus,
"UserEmailStr", UserEmail.Email,
"GroupStr", Group.Value
)
);

And in the Items property of my gallery where I am displaying the tasks in this way:
(Gallery) taskList = Items

 

Filter(
TB_FORM,
DueDate > Today(),
Group.Value = LookUp(
colUserGroupStatus,
UserEmailStr = User().Email
).GroupStr
)

However, the problem and where I need help to solve this is that even after converting them to the string type, the error of different types persists, follow below my sharepoint lists structure

  1. TB_FORM List:
    • ID: Number, a unique identifier for the task.
    • Title: Text, the title of the task.
    • DueDate: Date, the due date of the task.
    • Modified: Date, the date when the task was last modified.
    • Created: Date, the date when the task was created.
    • Created By: User, the user who created the task.
    • Modified By: User, the user who last modified the task.
    • Group: Choice, the group to which the task is assigned.
    • formUrl: Hyperlink, the URL of the form associated with the task.
      1. UserGroupStatus List:
        • ID: Number, a unique identifier for the record.
        • UserEmail: User, the email of the user.
        • GroupStatus: Choice, the group to which the user belongs.
        • CheckboxStatus: Yes/No (Boolean), the status of the checkbox.
        • DataConclusao: Date, the completion date of the task.
        • TaskID: Lookup, linked to the ID of the TB_FORM list, represents the task that the user is performing.



          Errors screenshots bellow

           

           

          MilHouse_0-1684508263024.png
Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @MilHouse ,

     

    Let's select the value of the Groupstr column that is returned by the LookUp:

     

    Filter(
    TB_FORM,
    DueDate > Today(),
    Group.Value = LookUp(
    colUserGroupStatus,
    UserEmailStr = User().Email
    ).GroupStr.Value
    )

     

  • MilHouse Profile Picture
    64 on at

    i changed it but i still receiving those errors as the image below

    MilHouse_0-1684514302385.pngMilHouse_1-1684514306957.png

     

     

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @MilHouse ,

     

    Can you please share the detailed error texts?

  • MilHouse Profile Picture
    64 on at

    of course here they are 

    MilHouse_0-1684516459103.png

    MilHouse_1-1684516463888.png

     

     

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    HI @MilHouse ,

     

    It seems like multiselect is enabled on some of the columns? Can you confirm or share a preview of colUserGroupStatus?

  • MilHouse Profile Picture
    64 on at

    i'am using multi selection o sharepoint (Todos os colaboradores mean all person in my company)

    MilHouse_0-1684518100656.pngMilHouse_1-1684518102861.png

     

     


    but follow bellow the visualization of a table of the collection thath i've created on sharepoint while tried to convert(colUserGroupStatus) choice to string, when i try to visualizate the itens in my collection he do not show anything and show the same erros that i've sent in the other comment above


    here is how i'am creating the  colUserGroupStatus to try to convert the types of sharepoint choice and user to string to be able to filter

    MilHouse_2-1684517855830.png

     

     

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @MilHouse ,

     

    The issue is that what you have doesn't convert the choice to text, but returns a table of the selected values.

     

    Another issue with the logic itself is that if two choices were selected in reverse, it will not work. In your example you would not get a hit for instance.

     

    Moreover, to get to a solution, you need to confirm if you want to return all items from TB_Form which in the Group column:

    1. contain one or more of the selected item for the User's GroupStatus column

    2. contain all of the selected item for the User's GroupStatus column

    3. exactly match all of the selected item for the User's GroupStatus column

  • MilHouse Profile Picture
    64 on at

    so i cant use two option in my Group choose column right only one ? there is not another way to do this ? i would like to retunr the exactly match all of the selected item for the User's GroupStatus column but those items have to come from the colums groups in the sharepoint list

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @MilHouse ,

     

    To get an exact match (same amount of items and the same values), try the below formula:

     

    Filter(
     TB_FORM,
    	DueDate > Today(),
     With(
     {
     _Data: LookUp(
    				UserGroupStatus,
    				UserEmail.Email = User().Email
    			).GroupStatus.Value
     },
     Not(
     false in ForAll(
     _Data,
     ThisRecord in Group.Value
     )
     ) && CountRows (_Data) = CountRows(Group)
     )
    )
  • MilHouse Profile Picture
    64 on at

    i tried the code above but now is showing the error below.

    MilHouse_10-1684521164125.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard