Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Unanswered

Using DataCard as Searchbox and result in gallery. On select the result

(0) ShareShare
ReportReport
Posted on by 11
Hi there,

First of all not sure I’m in the correct thread or not, apologies if I’m not.

I’ve Watch couple of videos and I’ve learn quite a lot about power apps and I’m also kind of Mew to this. I’m struggling with a problem here? Not sure if I’m not using the right keyword when I googled it but tried different ways couldn’t find anything. I though sharing here, someone might able could help me out.

Scenario: Doing a datacard page where user have a list of courses and it is link to my excel in OneDrive for business. I use datacard and it has 3 screens.I’m stuck on screen 3 which is the edit screen or new item screen where by, using a datacard value to search for the owner(staff name) which is link to my office365 acct by using the Office365Users.SearchUser command. I got that output onto a gallery which I inserted manually. Now here comes the problem.

Problem 1: I’m trying to use the result in the gallery when the search is performed in the datacard value. Eg. if I search John in the datacard. Result appears in the gallery and I can choose which John I want from the list, this is where the OnSelect option I tried but it doesn’t work.I intended purposely to use gallery because of future upgrading purpose.

Problem 2: I want the gallery to be only visible when the search is perform, once the result is selected or move to next datacard(section). It should disappear. Hope anyone here can advice or help me out. Very much appreciate your help and assistance on this.

Regards,
Harry
  • BarryHattle Profile Picture
    11 on at
    Re: Using DataCard as Searchbox and result in gallery. On select the result

    Hi everyone, have been busy with work lately, now i have sometime to spare for this project. i have tried to use the method kriss suggested but that is not exactly what i would like to achieve. i do not want a search icon rather a instant result whereby when we type something on the text input and the result will appear when need to click on the search icon. And the other is the visible of the gallery, where it should disappear when it is selected or there is no search perform. i have watch couple of videos from Youtube from Progmatic and Shane but still could achieve the result.

     

    thanks in advance and appreciate your help.

     

    regards,

    Harry

  • BarryHattle Profile Picture
    11 on at
    Re: Using DataCard as Searchbox and result in gallery. On select the result
    Still waiting for someone to help me out as I’m stuck.
  • BarryHattle Profile Picture
    11 on at
    Re: Using DataCard as Searchbox and result in gallery. On select the result

    Dear Kris,

     

    I have attached some pics for you to have a better picture. i have tried to remove the o365 connector and recreate a new one, the result is still empty. i took a few pics but unfortunately can't attach more than 3 here.

     

    Actually i was thinking without the search icon is it to possible to achieve this result too by just hit enter or as we type the result is dynamic which i used to have before.

  • v-xida-msft Profile Picture
    on at
    Re: Using DataCard as Searchbox and result in gallery. On select the result

    Hi @BarryHattle ,

    Yeah. Based on the needs that you mentioned, I think the solution I provided above could achieve your needs.

     

    Please make sure the UserProfileCollection is populated with proper records after you clicked the "Search" icon. Also please make sure the Office 365 Users connection is valid in your app, if not, please re-create a new connection to your Office 365 Users connection, then try it again, check if the issue is solved.

     

    Best regards,

  • BarryHattle Profile Picture
    11 on at
    Re: Using DataCard as Searchbox and result in gallery. On select the result
    Dear Kris,

    Thank you so much for taking your timing on replying. Very much appreciate it

    To answer your question. I have no idea what is it as it was auto created as when I linked up to my excel in ODB. I believe it is a text box input and definitely not a combobox.

    I have tried you suggestion just now while I’m working on it but I couldn’t get any result where i used to be able to. I’m guessing this is because the data source somehow changed to userprofilecollection instead of officer 365. Currently when I search for a user It will straight away appear those users that I’m typing accordingly as the characters and result will appear. Will grab some screen shot to share once I get back onto my laptop later. So that I believe you can have a better understanding and advise me further on it.

    Once again thank you so much
  • v-xida-msft Profile Picture
    on at
    Re: Using DataCard as Searchbox and result in gallery. On select the result

    Hi @BarryHattle ,

    Could you please share a bit more about the Data card in your screen3? Is it a ComboBox or a TextInput box?

    Do you add a Gallery control in your Screen3 to display the searched result?

     

    Based on the needs that you mentioned, I think a collection variable could achieve your needs. I assume that the data card that you mentioned in your Screen3 is Text Input box, is it true?

     

    You could consider unlock the corresponding data card in your Screen3, then add a "Search" icon into this data card as below:

    5.JPG

    Set the OnSelect property of the "Search" Icon to following:

    ClearCollect(
     UserProfileCollection,
     Filter(Office365Users.SearchUser({top: 999}), DataCardValue.Text in DisplayName)
    );
    Set(ShowUp, true)

     

    Set the Items property of the Gallery to following:

    UserProfileCollection

    set the OnSelect property of the Gallery to following:

    Set(CurrentSelectedUser, ThisItem.DisplayName); // Store the selected user name from your Gallery into a variale 
    Set(ShowUp, false)

    Set the Visible property of the Gallery to following:

    ShowUp

     

    Set the OnVisible property of the current screen to following:

    Set(CurrentSelectedUser, Blank())

     

    Set the Default property of the Text Input box within the Data card you mentioned to following:

    If(!IsBlank(CurrentSelectedUser), CurrentSelectedUser)

     

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

     

    Best regards,

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35