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 / Adding additional coll...
Power Apps
Unanswered

Adding additional collections, multiple collection clearing and collecting

(0) ShareShare
ReportReport
Posted on by 201

I have the below working

 

Clear(colPTStd);
If(
 FormNDT.Mode <> FormMode.New,
 Collect(
 colPTStd,
 galNDT.Selected.'PT Std'
 )
)

 

I need to add additional collections to both clear and collect. Same gallery and same form but how could I add additional collections?

Categories:
I have the same question (0)
  • realwillwright Profile Picture
    772 Moderator on at

    Hi @ScablandsKing 

     

    You would just need to add in more Clear(collection) and Collect(item(s)). You also have the function ClearCollect which clears the collection and then collects the data


    -------------------------------------------------------------------

    If my reply helped you, please give a 👍
    If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it.

  • ScablandsKing Profile Picture
    201 on at
    Clear(colPTStd);
    Clear(colMTStd);
    If(
     FormNDT.Mode <> FormMode.New,
     Collect(
     colPTStd,
     galNDT.Selected.'PT Std'
     )
    );
    If(
     FormNDT.Mode <> FormMode.New,
     Collect(
     colMTStd,
     galNDT.Selected.'MT Std'
     )
    );

    Is there a more organized way to do it than this?

  • Verified answer
    realwillwright Profile Picture
    772 Moderator on at

    Hi @ScablandsKing 

     

    You can do multiple actions within the If, see below. Each action is separated with a ';'

    Clear(colPTStd);
    Clear(colMTStd);
    If(
     FormNDT.Mode <> FormMode.New,
     Collect(
     colPTStd,
     galNDT.Selected.'PT Std'
     );
     Collect(
     colMTStd,
     galNDT.Selected.'MT Std'
     )
    );

     
    -------------------------------------------------------------------

    If my reply helped you, please give a 👍
    If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it.

  • ScablandsKing Profile Picture
    201 on at

    @realwillwright Thank you!

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard