I have my primary SQL table setup using i'ds for all of the related lookup data and a few additional fields for data entry.
My question is that when I go to create the app, how do I bring in the lookup tables and have the text data display for the lookups?
It was easy to create using a SharePoint list, however this is a new scenario for me.
Lookup table under SQL Table is a little different from that in SharePoint list.
TO have the proper ID displayed with the proper field, we need first add the corresponding Table into PowerApps, then use the lookup() funciton to map the ID, and choose the field to display.
Within the Primary Table Gallery, for the Label to show the Contractors name, the formula should be:
Lookup (Contractors, ID=ThisItem.ContactID, ContractorNameField)
Meneghino has a good explaination on this part in the following thread:
In addition, now that we have the possibility of adding views to PowerApps, this might a better solution for some scenarios.
Just create the view that you like with the text and connect to it from PowerApps
Thank you for your assistance. So your information was very helpful in creating a lookup. Now my next follow up question.
I have these tables:
This is the primary table fields.
When you create a connection, initially you are only allowed to select one data souce. (Which I did, the primary (Inspections). Then once the app is created, I added the additional lookup tables. By default Power Apps build the app around the primary table that has all of the ID columns.
The default view is just a text field that only allows numbers (ID's). If I update with the lookup statement, I get a list of the data but it does not update the primary table.
I created the SQL tables to be future proof and based upon ID's in case the text data was to change in the future.
So my form should display the "text" (User Friendly data), and when selected / updated - update the SQL primary table while being limited to only the lookup table data for the lookup fields.
How do I change the text (ID) field to not only display the text (user friendly data), but also to upadate the primary table with the appropriate ID's?
Any help would be greatly appreciated.
I tried that, however it only allows a view only scenario. I am trying to create a data entry app, that collects data and updates an SQL database. Thanks for the idea.
From your comment I gather that you are building an app from data as opposed to a blank canvas app?
In my experience it is much easier in the end to build a blank canvas app and avoid the use of forms, just build the forms you need from the individual controls.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200