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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating on Collection
Power Apps
Answered

Creating on Collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I've two collections (that I created from SP List).

Collection 1 (DIVK) that has the following columns. (SerialNumber has UNIQUE values):

SMN    MaterialDescription SerialNumber
1MD1S1
1MD2S2
2MD3S3
3MD4S4
3MD5S5
4MD6S6
4MD7S7
4MD8S8
5MD9S9
5MD10S10
5MD11S11
5MD12S12

 

 

Collection 2 (InstrumentGroups) that has the following columns (SMN has unique values):

SMNModelGroup
1MG1
2MG2
3MG3
4MG4
5MG5

 

 

I want to create one collection that reads as shown below. Which is basically:

  1. Adding a new column to the collection with the name of ModelGroup
  2. The ModelGroup of each record will be depending on the SMN value in InstrumentGroups Collection
  3. If SMN is blank in DIVK collection, I want to put in ModelGroup of the newly created collection "N/A".
SMN  MaterialDescription SerialNumber  ModelGroup
1MD1S1MG1
1MD2S2MG1
2MD3S3MG2
3MD4S4MG3
3MD5S5MG3
4MD6S6MG4
4MD7S7MG4
4MD8S8MG4
5MD9S9MG4
5MD10S10MG4
5MD11S11MG4
5MD12S12MG4

 

 

I tried to use AddColumns but I was not successful. I hope someone can help me.

 

 

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Try this:

    ClearCollect(ModelGroups,Blank());
    ForAll(DIVK As ItemTable,
     Collect(ModelGroups,
     {
     SMN: ItemTable.SMN,
     MaterialDescription: ItemTable.MaterialDescription,
     SerialNumber: ItemTable.SerialNumber,
     ModelGroup: if(!isblank(ItemTable.SMN),LookUp(InstrumentGroups, SMN = ItemTable.SMN,ModelGroup),"N/A")
     }
     )
    );

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,070

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 608

Last 30 days Overall leaderboard