Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

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

  • Verified answer
    Re: Bug with SearchBar

    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

  • Re: Bug with SearchBar

    @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

  • mdevaney Profile Picture
    mdevaney 29,987 on at
    Re: Bug with SearchBar

    @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?

  • Re: Bug with SearchBar

    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
    mdevaney 29,987 on at
    Re: Bug with SearchBar

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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard