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 / Please, can someone se...
Power Apps
Answered

Please, can someone see where my Filter error is?

(0) ShareShare
ReportReport
Posted on by

Goodday to you all: I have what I thought was a rather simple filter but it does not work.

 

ClearCollect(colAllItems, Filter('SOI Orders', "ID" = colFollowUpThisWeek.SOI_x002d_ID))

 

The error is "Invalid argument type".  

I am trying to collect items filtered from SP list 'SOI Orders' where the ID matches the field  SOI_x002d_ID (a text field) of a collection of similar items.

 

I have tried the function Text(ID) and removing the quotes--no work. and I've tried converting SOI_x002d_ID to a value, no work. I am stymied.

 

What am I doing wrong?

 

Thank you for your keen mind.

 

Chris

 

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @ChrisChong,

    if the data is in a textinput box, say TextInput1, you reference it by TextInput1.Text so your formula would include ID=TextInput1.Text. If this answers your question please mark it solved.

     

  • ChrisChong Profile Picture
    on at

    Thanks for the suggestion. But neither side of the "=" is a text box, the left side is a SP list ID and the right side is a collection.  I don't know what how to rid myself of the error.

    Thank you.

    Chris

  • Verified answer
    strategery Profile Picture
    179 on at

    Whenever you use = the expression will expect the same datatype on both sides, which won't work here. You have ID which is a number (and does not need quotes around it) on the left, and on the right you have a collection. That comparison calls for the 'in' operator to search for a number within a collection.

     

    ClearCollect(colAllItems, Filter('SOI Orders', ID in colFollowUpThisWeek.SOI_x002d_ID))
  • ChrisChong Profile Picture
    on at

    STUPENDOUS! THANK YOU.

  • strategery Profile Picture
    179 on at

    Great! Thought I would clarify. Technically 'in' works with arrays, and collections are arrays of values. This means it can be used in other ways, for example:

     

    Number in Collection.NumberField

    Number in Collection.TextField

    Text in Collection.TextField

    Number in SomeOtherText

    Text in SomeOtherText

     

    Numbers can be found 'in' text, and text can be found 'in' other text because "text" itself is an array of letters/numbers/symbols.

  • ChrisChong Profile Picture
    on at

    Many many thanks.

    Chris

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Just a note but the in operator is not usually delegatable.

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 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
timl Profile Picture

timl 122 Super User 2026 Season 2

Last 30 days Overall leaderboard