cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ryder
Helper III
Helper III

How to display only a selected user in a gallery

Hello,
on my application I have a screen that displays a patient's file with several information, on the same screen I can access the history of consultations of the patient by pressing label.
It takes me to another screen containing the history of consultations, except that this one displays all the consultations of all the patients except me I only want to display the history of the patient previously selected in the old screen.

 

What should I put in ''item'' so that it selects the patient I want to see?

 

Thank you for your help

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Ryder 

To get the list of consultations from the patient selected in the previous screen you can:

Assuming

Gallery1 is patient list and Gallery3 is the medical history and that you click/select the patient in Gallery1

you should set Items in Gallery3 to Filter(consultations; Patient_id = Gallery1.Selected.Patiend_id)

Gallery1.Selected.Patiend_id is the selected patiend id

View solution in original post

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @Ryder ,

I assume the "history" is a Gallery - I will call it Gallery1 - replace with your name.

I also assume you have a Patient Number somewhere in the data - I will use PatientID

Also your list name - I will use Patients

So the Items of the new gallery would be

 

Filter(
   Patients,
   PatientID = Gallery1.Selected.PatientID
)

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz 

  • I assume the "history" is a Gallery - I will call it Gallery1 - replace with your name.  ✔️ (Gallery3)
  • I also assume you have a Patient Number somewhere in the data - I will use PatientID
    Screenshot_1.png

              normally it's this.

 

  • Also your list name - I will use Patients
    To be honest, I don't know what that refers to 😕 

 

PS : A little information might be helpful.
I have two entities, the first "patient" which contains the list of patients and the second "consultation" which is supposed to contain the list of all consultations.

 

Screenshot_2.png

Hi @Ryder 

To get the list of consultations from the patient selected in the previous screen you can:

Assuming

Gallery1 is patient list and Gallery3 is the medical history and that you click/select the patient in Gallery1

you should set Items in Gallery3 to Filter(consultations; Patient_id = Gallery1.Selected.Patiend_id)

Gallery1.Selected.Patiend_id is the selected patiend id

Thanks for your help @ilton 

It's working 😊

Screenshot_3.png

 

Have a nice day ^^

@Ryder ,

Good to see it working.

I am in a different time zone and just got back to it - 6 am here

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,647)