Hi, I'm having some trouble replacing the default text fields with dropdowns on the edit screen. Everything saves fine back and forth from SQL with the text fields.
Unlock the card, hide the textinput box and place a dropdown control into the card, say DropdownX. Make sure that the card is selected so the dropdown is actually inside the card. If you are saving the ID field from the dropdown, for example if there is a one to many relationship between the list in the Edit form and the list in the dropdown, click on the card and select the Update property. Remove the reference to the textinput control and replace it with DropdownX.Selected.ID. This will insert the Foreign key in your list. To work, your list must have the column the card is connected to as a Number. If you are storing the actual value of the dropdown control in the list of the Edit form, then replace the Update property with DropdownX.Selected.Value or DropdownX.Selected.ActualNameOfField . In that case, your SharePoint list should have that column as a Single line of text. The key to saving the correct value in your list is the Update property of the card containing the control.
FYI, although a dropdown control only shows one value in the window, but it actually contains the entire record and all the fields in the record can be referenced as described above even if they are not shown in the control's window.
Thanks for the reply. Here's what I have overall and have in place. Hopefully I'm moving in the right direction.
From SQL, in my dbo.company table, I have Company_ID 1,2,3, etc. and a column Company_Name.
This Company_ID is from my dbo.audit that I'm working with.
Not sure what I'm missing...lol
The default property the dropdown control in the card should be Parent.Default. It sounds like it is still "1" from PowerApps dummy dataset for the control.
Hi, the company should be pulling from the company table. The table where I have "Company_ID", "Industry_ID" is different. Parent.Default does not show anything when I added the dropdown.
Others have said that I should use something like this for the display? I know it's wrong/wrong-ish. It shows a warning but pulls the right information. Maybe I should use this for edit. Again, confused.
LookUp('[dbo].[company]', ID = DataCardValue89.Text, Company_Name)
The DataCardValue89 is the value of the card or "2". The "2" pulls correctly from company table.
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights