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 / Search Items in Gallery
Power Apps
Answered

Search Items in Gallery

(0) ShareShare
ReportReport
Posted on by 70

Hello,

 

I created a gallery of items from Sharepoint List .

 

I created a search Box (Textinput1) and under Items function of the gallery i am using the search code as

 

Search('PBB JE',TextInput1.Text,"Title") . PBB JE is the sharepoint list.

 

I am getting errors as 'Invalid Arguement Type' . (Table) , expecting a Text value instead"

 

The Title column is a Single line text field . I am not using any collection.

 

Not sure what is wrong here . Any help on this is highly appreciated to resolve this error.

 

Thank s & Regards

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @bsoleti 
    There does not appear to be any obvious error in your code.

     

    Please take a screenshot.  Make sure the error message and the formula is included showing the red underlined section of code.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • bsoleti Profile Picture
    70 on at

    Hello,

     

    Here are the screen shots

     

    bsoleti_1-1593552206092.png

    Code and Error(The function search has invalid arguements) . Without search everything works fine.

     

    bsoleti_2-1593552302232.pngbsoleti_3-1593552436006.png

    Thanks

  • BenFetters Profile Picture
    on at

    Hi bsoleti,

     

    Looking at your screen shot, it looks like you just put a ")" in the wrong place. Don't worry, I do that all the time! try changing the very end of your formula to something like this: ...   .Selected.Value),'PBB JE'),TextInput1.Text,"Title")

     

    If you noticed, I moved the ")" from ".Value))" to 'PBB JE') to close the "if statement" that you had. Let me know if that doesn't make sense or if that didn't work and I would be happy to help!

     

    If it did work, feel free to hit "Accept as Solution".

     

    Kind regards,

    Ben Fetters

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @bsoleti 

    According to the screenshot that you mentioned, I think there is something wrong with the Search formula in the Items property of the Gallery.

     

    Please consider remove the part marked as "yellow" in your Search formula as below:

    7.JPG

     

    On your side, you should modify your formula as below:

    Search(
     If(
     Dropdown_MONTH.Selected.Value = "All" && Dropdown_YEAR.Selected.Value = "-",
     'PBB JE',
     Dropdown_MONTH.Selected.Value = "All" && Dropdown_YEAR.Selected.Value <> "-",
     Filter('PBB JE', Year.Value = Dropdown_YEAR.Selected.Value),
     Dropdown_MONTH.Selected.Value <> "All" && Dropdown_YEAR.Selected.Value = "-",
     Filter('PBB JE', Month.Value = Dropdown_MONTH.Selected.Value),
     Dropdown_MONTH.Selected.Value <> "All" && Dropdown_YEAR.Selected.Value <> "-",
     Filter('PBB JE', Month.Value = Dropdown_MONTH.Selected.Value && Year.Value = Dropdown_YEAR.Selected.Value)
     ),
     TextInput1.Text,
     "Title"
    )

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • bsoleti Profile Picture
    70 on at

    Great. It works.

     

    Thanks very much.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard