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 / Collect from checkbox ...
Power Apps
Unanswered

Collect from checkbox only some columns

(0) ShareShare
ReportReport
Posted on by 105

What am I doing wrong?

Schermata 2022-11-01 alle 14.21.08.png

I have a SharePoint list named Archivio HU which has many columns. 

I want to collect through checkbox only the values ​​of 3 columns of the items selected in the checkbox: "NR_HU", "PL" and "CBM"

Categories:
  • Akser Profile Picture
    1,546 Moderator on at

    ThisItem is a record, not a table. What you can do is to covert the record to a table (using the Table function), select the columns you would like and finally add it to the collection of yours. Does it make sense? 

  • roby9390 Profile Picture
    105 on at

    @Akser Could you help me with the formula? Also the one related to the action of removing from the collection when executing the UnCheck

  • Akser Profile Picture
    1,546 Moderator on at

    Sure.

     

    This is how you would add the selected record to your collection:

     

    Collect(MyCollection, ShowColumns(Table(ThisItem), "ID", "NR_HU", "PL", "CBM"))

     

    And removing would be the same I guess. Let me know if it doesn't work out.

     

    Remove(MyCollection, ThisItem)

     

    If the Remove action doesn't work, try this formula to add the record (this one convert the table back to a record after selecting the columns we want. I included the ID with the hope that it's going to help to determine which 'record' to remove):

    Collect(MyCollection, First(ShowColumns(Table(ThisItem), "ID", "NR_HU", "PL", "CBM")))

     

  • roby9390 Profile Picture
    105 on at

    @Akser The remove formula give me an error: "this formula uses scope, which is not currently supported for evaluation"

     

  • Akser Profile Picture
    1,546 Moderator on at

    What about this one?

    Remove(MyCollection, ID = ThisItem.ID)
  • roby9390 Profile Picture
    105 on at

    @Akser Same problem! But right now I tried to check if at least updating the record in the SharePoint list works and ... nothing doesn't work.

    IM becoming crazy. It would all be easier if the whole row collection worked, as you said too, but I don't understand why it doesn't update the record.

  • Akser Profile Picture
    1,546 Moderator on at

    I'm afraid we need to go step by step. What happens when you 'check' the checkbox using the following formula?

    Collect(colColliSelezionati; First(ShowColumns(Table(ThisItem); "ID"; "NR_HU"; "PL"; "CBM")))

    Can you share a screenshot and show the collection (colColliSelezionati) looks like?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard