cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Level 8

ComboBox with (2) data sources?

Hi Folks -

 

I have a need to leverage a ComboBox, but I need the list of values to be populated from (2) different data sources:

 

RD_Target_List & RD_Portfolio_Compound_List.  From both tables, I need to display the "Alias" column.  Another peices is there is another field in both SP tables called "Portfolio_Status" so I only want to display values from the Alias columns AND are not "Terminated" for the "Portfolio_Status" column.

 

I'm trying to play around with multiple galleries but can't quite seem to get anything to produce the results I want. Hoping some folks can shed some light for me, thank you!

22 REPLIES 22
ZePowerDiver
Level 8

Re: ComboBox with (2) data sources?

Hello simms,

 

have you considered working with a collection for your combobox values? Collect data from both of your data sources into that collection and use the collection as the items for the combobox. This is considering you don't have too many rows for each of those 2 sources.

Anonymous
Not applicable

Re: ComboBox with (2) data sources?

Hi,

 

On the OnStart statement of your app :

Clear(ListElements);;
ForAll(
Filter(RD_Target_List ;Portfolio_Status= "Terminated");
Collect(ListElements;Alias)
);;
ForAll(
Filter(RD_Portfolio_Compound_List;Portfolio_Status= "Terminated");
Collect(ListElements;Alias)
)

 

And then, on your dropdown Items statement, you put ListElements

 

Regards, Louis

simms7400
Level 8

Re: ComboBox with (2) data sources?

collect.png

 

@Anonymous  Thank you!

 

I tried that syntax on the "OnStart" but it's not validation.  I can confirm all names are correct. ANy idea?

 

 

simms7400
Level 8

Re: ComboBox with (2) data sources?

Nevermind I think I got it. I replaced hte vairous ; symbols with commas and that seemed to validate. I"ll let you know if there are nay more issue when I test.

 

Thank you!!!!

Anonymous
Not applicable

Re: ComboBox with (2) data sources?

I think we have not the same version of PowerApps, that's maybe that!

 

I see you replaced my ";;" by ";", then replace my ";" by "," 😄

Regards,

 

Louis

Anonymous
Not applicable

Re: ComboBox with (2) data sources?

That's it ! Try it out and tell me 😉

 

Louis

ZePowerDiver
Level 8

Re: ComboBox with (2) data sources?

It's because in French vs English (for example) separators are different in PowerApps. I changed my laptop language because of that, since most examples on the web are with comas and single semicolon
simms7400
Level 8

Re: ComboBox with (2) data sources?

@ZePowerDiver @Anonymous 

 

Hi Both - this worked like a charm!!  However, since it's a dropdown box, i'm unable to search the list of values.

 

is it possible to make this a ComboBox? If so, what would I use as the data source?

ZePowerDiver
Level 8

Re: ComboBox with (2) data sources?

@simms7400Collections can serve as a source for both dropdown and combobox 😉

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,443)