cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (20,832)