cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VeeLearnMSFT
Post Partisan
Post Partisan

Connect A searchable List to Form Control

I want to be able for a user to see what is inside of the shareponit list, just the titel only which is what the Primary Care APP is.  When I click on it I want it to bring in all the items inside of the form control.  How do I make this happen?

 

VeeLearnMSFT_0-1660144770708.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Drrickryp
Super User
Super User

@VeeLearnMSFT 

There needs to be a field connecting the two lists.  I suggest that you use something like PhysicianPracticeID as a number type column in the child list.  It will be the ID from the Physician Practice list.  Then, assuming the gallery on the left is your physician practice list and is called Gallery1, you would set the DataSource of the form to 'App Practice Opportunity Profile' and the Item property to:

Lookup( 'App Practice Opportunity Profile', ID=PhysicianPracticeID). 

Then In the card for PhysicianPracticeID in the form, Set the Update property of the card to: Coalesce(Parent.Default, Gallery1.Selected.ID)

and hide the card. This will guarantee that if the form is in new mode, it captures the ID from the Physician practice table since the Parent.Default will be blank.  In the case of the form being in edit mode, there will be a value as the Parent.Default.  I would hide it so the user can't change it. 

 

View solution in original post

Drrickryp
Super User
Super User

@VeeLearnMSFT 

If it helped answer your question, please mark it solved so others can find it.

View solution in original post

10 REPLIES 10
Drrickryp
Super User
Super User

@VeeLearnMSFT 

There needs to be a field connecting the two lists.  I suggest that you use something like PhysicianPracticeID as a number type column in the child list.  It will be the ID from the Physician Practice list.  Then, assuming the gallery on the left is your physician practice list and is called Gallery1, you would set the DataSource of the form to 'App Practice Opportunity Profile' and the Item property to:

Lookup( 'App Practice Opportunity Profile', ID=PhysicianPracticeID). 

Then In the card for PhysicianPracticeID in the form, Set the Update property of the card to: Coalesce(Parent.Default, Gallery1.Selected.ID)

and hide the card. This will guarantee that if the form is in new mode, it captures the ID from the Physician practice table since the Parent.Default will be blank.  In the case of the form being in edit mode, there will be a value as the Parent.Default.  I would hide it so the user can't change it. 

 

I am getting errors, I must be doing something incorrectly.

 

Form Control: It says this isnt connected to any data yet.

VeeLearnMSFT_1-1660146071354.png

 

Drop Down

VeeLearnMSFT_2-1660146087661.png

 

Drrickryp
Super User
Super User

@VeeLearnMSFT 

You must have a Data Source for the form and it has to be an actual list, not a collection or variable or formula.   You put the formula in the Item property not the Data source.  Do you actually have a column for the Practice list ID in your Opportunity list or are you using Title as the common field in both lists? 

this is how the form is connected currently.  How do I change it so that it works with the solution you provided. I sincerely apologize if I am of frustration but honestly this is my first PowerApp.

 

VeeLearnMSFT_0-1660146465807.png

 

Title is how I am selecting the list.  Sorry again.

VeeLearnMSFT_0-1660146898236.png

 

Drrickryp
Super User
Super User

@VeeLearnMSFT 

Since you are designing your first PowerApp, please see my blog post about database design.  It consists of 4 connected posts and starts here.  It will help you about how to create apps.   https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/Database-Design-Fundamentals-and-Power... .  The last two in the series explain how to structure and implement the structure in a SharePoint app.  My post here also talks about the pitfalls of SharePoint in PowerApps. https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/The-Ten-Commandments-of-SharePoint-in-... .  Hopefully, this will provide you with the minimum background that you will need for an app with more than one table (list). 

Thank you so much.  I think I am getting closer. One final push. I am no longer getting errors but nothing is feeding through.

 

Here is the form Control:

VeeLearnMSFT_0-1660150673970.png

VeeLearnMSFT_1-1660150751649.png

 

Here is the DropDown3 Box:

VeeLearnMSFT_2-1660150819363.png

 

It seems like I do not have them linked correctly or something needs to be set to update.  Not sure, I am so close. 

Drrickryp
Super User
Super User

@VeeLearnMSFT 

Set the form default mode to edit and see what happens. If the Item property of the form is set correctly you should see the data for the record selected in the dropdown.

VeeLearnMSFT
Post Partisan
Post Partisan

Okay so I exited the form and got back in and it worked...Maybe it was just a temporary glitch?  Thank you for your time~!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,410)