cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndyRossco
Helper II
Helper II

Basic ComboBox using lookup table from sql tables

Hi,

I have 2 SQL Tables, [dbo].[tblVanJourneyLog] and [dbo].[tblVan_Details]

     I am trying to create a Combo Box which looks up our Van Registration List from a Van Details Table which has primary key as Van_Id, I what user to select from actual Reg Numbers not Van_Id.

Then I want to store Van_Id selected and store in VanID of the [dbo].[tblVanJourneyLog].

I have tried many things with no luck. I would greatly appreciate any help on this.

I have created a basic App using PowerApps auto generated using the  [dbo].[tblVanJourneyLog] table. Then I added the [dbo].[tblVan_Details] table. Any help on this would be very appreciated. Andy

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @AndyRossco ,

Could you please share a bit more about your scenario?

Do you configure the VanID field as a ComboBox within your Edit form, which references values from the [dbo].[tblVan_Details] table?

Further, do you want the CmboVanSelect box to display selected value when you edit your [dbo].[tblVanJourneyLog] record?

 

Based on the screenshot that you mentioned, I think there is something with the LookUp formula you used in your CmboVanSelect.

I have made a test on my side, please take a try with the following workaround:

Set the Items property of the CmboVanSelect within the VadID_DataCard2 to following:

'[dbo].[tblVan_Details]'

Set the Primary text property and SearchField property to Reg column.

 

Set the Update property of the VadID_DataCard2 to following:

CmboVanSelect.Selected.Van_Id

 

If you want the CmboVanSelect box to display selected value when you edit your [dbo].[tblVanJourneyLog] record, please take a try with the following workaround:

Set the DefaultSelectedItems property of the CmboVanSelect box to following:

{
  Reg: LookUp('[dbo].[tblVan_Details]', Van_Id = ThisItem.VanID, Reg)
}

 

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

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks, This information has sorted my problem.

 

🙂

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @AndyRossco ,

Could you please share a bit more about your scenario?

Do you configure the VanID field as a ComboBox within your Edit form, which references values from the [dbo].[tblVan_Details] table?

Further, do you want the CmboVanSelect box to display selected value when you edit your [dbo].[tblVanJourneyLog] record?

 

Based on the screenshot that you mentioned, I think there is something with the LookUp formula you used in your CmboVanSelect.

I have made a test on my side, please take a try with the following workaround:

Set the Items property of the CmboVanSelect within the VadID_DataCard2 to following:

'[dbo].[tblVan_Details]'

Set the Primary text property and SearchField property to Reg column.

 

Set the Update property of the VadID_DataCard2 to following:

CmboVanSelect.Selected.Van_Id

 

If you want the CmboVanSelect box to display selected value when you edit your [dbo].[tblVanJourneyLog] record, please take a try with the following workaround:

Set the DefaultSelectedItems property of the CmboVanSelect box to following:

{
  Reg: LookUp('[dbo].[tblVan_Details]', Van_Id = ThisItem.VanID, Reg)
}

 

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

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks, This information has sorted my problem.

 

🙂

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors