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 / How to store more than...
Power Apps
Answered

How to store more than one value in a variable

(0) ShareShare
ReportReport
Posted on by 32

I have a gallery with check boxes. When the user clicks on the check box, that value is stored in a variable called "SelectedTeam" (I put it in a label under the "Send" button for reference); the issue is that it will store only the last one selected; I want to store all the marked items in the "SelectedTeam" variable, because when the "Send" button is pressed, I am passing that variable to a PUT request that associates those users with a number. See attached.

Power_User21_0-1641496136495.png

 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Power_User21 

    Skip the variable - you don't need it!

    In your send OnSelect action, determine what is checked in the Gallery:

    This formula:

    Filter(yourGallery.AllItems, yourCheckbox.Value)

    Will return a table of all the items checked in your gallery.

    From that you can apply any other actions you want.

     

    I hope this is helpful for you. 

  • Power_User21 Profile Picture
    32 on at

    But I need to store those values in a variable, because I need to pass that variable to the API (A Put Request). How do I store all the checked items in a variable?

  • Power_User21 Profile Picture
    32 on at

    Nevermind. I just used Set. Thank you

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Power_User21 

    Yes, you need not even do that.  There is no variable needed.  You hadn't supplied any info for the API call you are trying to make, so the general idea is (assuming an email address from your Gallery):

    yourApi.Run(
     Concat(Filter(yourGallery.AllItems, yourCheckbox.Value), email & ";")
    )

    This would provide a semicolon separated parameter of emails to the call.

     

  • Power_User21 Profile Picture
    32 on at

    Fantastic! That's exactly what I wanted. It's working perfectly. Thank you a lot.

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 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard