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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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