web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Two collections will b...
Power Apps
Answered

Two collections will be one

(0) ShareShare
ReportReport
Posted on by

Hi comunity,

I have a question regardning the following example

Collection colCart i create with no prblem

TeamnameTeamCityTeamMusicTeamFruit
FishCity1PopApple
LionCity2DiscoCitrus

 

Then i will fill my two TextInput fields.

I have two TextInput.Text like this bellow

Color1 = TextInput1.Text  = Green
Color2=TextInput2.Text  = Yellow

 

And then i try two create my second Collection colColor


But when i try to create my second collection and use the values from the first togheter with the vaules from the second there getting problems.

It only take the first row in the first collection and not the second. like bellow

TeamnameTeamCityTeamMusicTeamFruitColor1Color2
FishCity1PopAppleGreenYellow


I use the code bellow. What am i doing wrong?

 

Collect(colColor;
{ Color1: TextInput1.Text;
Color2: TextInput2.Text;
Teamname: LookUp(colCart; !IsEmpty(Teamname)).Teamname
TeamCity: LookUp(colCart; !IsEmpty(TeamCity)).TeamCity;
TeamMusic:LookUp(colCart; !IsEmpty(TeamMusic)).TeamMusic;
TeamFruit:LookUp(colCart; !IsEmpty(TeamFruit)).TeamFruit
})




 

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Firstly, what you did is to modify the first collection rather than create a second collection.

     

    Secondly, Is this what you want?

    vxiaochenmsft_0-1650870357786.png

    If so , I will make a sample to create a second collection like the screenshot result.

     

    ClearCollect(colCart2,AddColumns(colCart,"Color1",TextInput1.Text,"Color2",TextInput2.Text))

    vxiaochenmsft_1-1650871437704.png

     

    Best Regards,

    Wearsky

  • Community Power Platform Member Profile Picture
    on at

    @v-xiaochen-msft , Thank you for that line of code 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard