cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DonutsSauvage
Level: Powered On

Create a List out of 2 smaller ones

Here's the situation:

My app allows reading and writing on 2 different tables (both come from excel but one is Table_A and the other Table_B). These 2 tables have a common field as far as name is concerned: Serial_number. I'm looking to create a list of all the serial numbers of both these tables, list that could be used to select an item from it and do things with it.

Example: In the same list (let's call it List_C) I want to be able to either select item_from_table_A or item_from_table_B, the selection process being based on the common field: serial_number.

 

Is there any way of achieving this in Power Apps ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Create a List out of 2 smaller ones

@DonutsSauvage 

You can collect both lists into one with a formula such as this:

ClearCollect(List_C, Table_A, Table_B)

If they both have the same columns, you will have one long list.

If they have dissimilar columns then you will have a collection with all items and all columns.

If serial_number is common in both list, then that column will be included and be populated from both sets of items.

If ALL you want is the serial_number columns, then you can use a formula such as this:

ClearCollect(List_C, ShowColumns(Table_A, "serial_number"), ShowColumns(Table_B, "serial_number"))

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
1 REPLY 1
Highlighted
Super User
Super User

Re: Create a List out of 2 smaller ones

@DonutsSauvage 

You can collect both lists into one with a formula such as this:

ClearCollect(List_C, Table_A, Table_B)

If they both have the same columns, you will have one long list.

If they have dissimilar columns then you will have a collection with all items and all columns.

If serial_number is common in both list, then that column will be included and be populated from both sets of items.

If ALL you want is the serial_number columns, then you can use a formula such as this:

ClearCollect(List_C, ShowColumns(Table_A, "serial_number"), ShowColumns(Table_B, "serial_number"))

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 194 members 5,625 guests
Please welcome our newest community members: