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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Bug with SearchBar

(0) ShareShare
ReportReport
Posted on by

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,989 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
    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,989 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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard