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 Apps
Answered

Bug with SearchBar

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I'm having trouble with the searchbar.
On my first gallery it works perfectly but in the second it bugs.
It's probably due to the fact that in the "items" parameter is already the data source "Consultation" and that it interferes with the second formula which creates a bug.
I don't know how to fix this?

searchbar.gif
Thank you in advance for your help

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 
    You can't supply more than one line of code in the Items property.  That's why you are receiving an error.  I don't understand why you are trying to do this... please explain.

     

    Suggest you copy + paste your code into the forums and explain what you are trying to do.  Trying to watch a GIF to and copy that information into a notepad is tough for a forum member to do because GIFs don't have any pause button.

     

    ---
    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." 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @mdevaney ,

    It's the first time I've used a gif in the forum, I thought it would be useful in this case but apparently it's not.


    What am I trying to do? Well I have a gallery and I'd like to search for a specific patient by name or date using the search bar.

    That's good to know I didn't know I could write a maximum of one line of code in the items property.

    and so I understand why on my first gallery in "items" I don't need to specify the source of data for it to display the information and so it allows me to put my formula: Search(Patient;searchbox.Text; "cr796_name"; "cr796_first name")

     

    gallery 1.png

     

    except that in the second gallery it's not the case, since in "items" there is the data source "consultation" and knowing that I can put only one line of code, I'm supposed to do how ?

     

    gallery 2.png

     

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 
    What would you like the search box + 2nd gallery to do?  I don't understand what your goal is here.  Sorry.

    Are you using the same search box for two different galleries here?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaney 

     

    In the first gallery, the search bar allows me to search for patients and in the second gallery it allows me to search for consultations,
    I use two different search bars, one for each gallery.

    Screenshot_3.png

     

    each box represents a consultation

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Finally I was able to find a solution thanks to this post:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Need-some-formula-help-on-search-items/m-p/14943#M6588

    Screenshot_4.png
    I thank you for the time you've given me!
    have a nice day

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard