cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

bring in more then one field to combobox

I need to bring in more than one field into the combobox but only display one field so, i can grab the other values from the selected item and add them to my patch statement.

 

Items:

Sort(Distinct('[dbo].[employee_directory]',EMPLOYEE_NAME),Result)

 

Need to also bring in

EMAIL_ADDRESS

SFXID

 

OnChange:

Patch('[dbo].[Entity_Base_Information]',LookUp( '[dbo].[Entity_Base_Information]',
ID_Num = Value(ID_NUM_LBL.Text)),
{QB_NAME: NewQb_name_ddwn_cbo.Selected.Result

}

)

 

 

 

thanks

Dave

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

The Distinct() is causing the issue. Does the employee_directory table have duplicate employee records that would require you to use Distinct?

 

If you need to use Distinct on that SQL table then it might be easier to create a view in the SQL and then use that view to populate Items property. The SQL view will allow you to run a Distinct on multiple columns and all the heavy lifting will be done on the server side This will return three fields and then you display the Employee Name in the Combo box.

 

SQL Example:
SELECT DISTINCT EMPLOYEE_NAME, EMAIL_ADDRESS, SFXID
FROM employee_directory
ORDER BY EMPLOYEE_NAME




 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Super User
Super User

The Distinct() is causing the issue. Does the employee_directory table have duplicate employee records that would require you to use Distinct?

 

If you need to use Distinct on that SQL table then it might be easier to create a view in the SQL and then use that view to populate Items property. The SQL view will allow you to run a Distinct on multiple columns and all the heavy lifting will be done on the server side This will return three fields and then you display the Employee Name in the Combo box.

 

SQL Example:
SELECT DISTINCT EMPLOYEE_NAME, EMAIL_ADDRESS, SFXID
FROM employee_directory
ORDER BY EMPLOYEE_NAME




 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

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

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (56,624)