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 / Using collections with...
Power Apps
Answered

Using collections with other functions in the same button

(0) ShareShare
ReportReport
Posted on by 62

I'm trying to use "Collect" with other functions, but I can't do it. Any solution for this?

My code now:
Clear(dadosPesquisaCrafter)&
Reset(InPesquisa)&
UpdateContext({_dadosPcBuscaVisible:false})

N1loCan_0-1674568719889.png

 

 

Categories:
  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    HI @N1loCan ,

     

    Instead of ampersands, use semicolons:

     

    Clear(dadosPesquisaCrafter);
    Reset(InPesquisa);
    UpdateContext({_dadosPcBuscaVisible:false})

  • N1loCan Profile Picture
    62 on at

    I tried, but it won't accept semicolons...

    N1loCan_0-1674574973772.png

     

  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @N1loCan ,

     

    What property are you trying to set. Based on the question I assumed it was a behavioral property like OnSelect, but perhaps it is a declarative property like Text?

     

    If it is a declarative property, you'll have to insert your code somewhere else in a behavioral property.

  • N1loCan Profile Picture
    62 on at

    In this print, I tried in OnSelect, but I also tried on the reset, but none of them worked...

    N1loCan_0-1674670607483.png

     

  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    HI @N1loCan ,

     

    The single semicolon is usually accepted to separate commands. However, depending on your locale it may be a double semicolon. What do you use to separate arguments in, for instance, an If statement? If they're commas, you need to use the single semicolon, if they're single semicolons, you need to use double semicolons to separate commands.

     

    Based on the above, please confirm you are using the right amount of semicolons and if still not working, please provide the error text.

  • N1loCan Profile Picture
    62 on at

    Hi @BCBuizer , I'm from brazil, and we use '&' in an IF statement, and also we use '&' for multiple commands, like the second print. The first print is the error with the code I'm using now.

    N1loCan_0-1675104136106.pngerror print



    N1loCan_1-1675104155059.pngmultiple commands

     

  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @N1loCan ,

     

    According to this article, the operator to use for separating functions in PowerApps whilst using the "pt-BR" locale is a single semicolon:

    BCBuizer_0-1675109333321.png

     

    https://learn.microsoft.com/pt-br/power-platform/power-fx/reference/operators

     

    Can you confirm you are using "pt-BR" as a locale?

  • N1loCan Profile Picture
    62 on at

    yessss, but weird, it does not accept when I use a semicolon. 
    It says "unexpected character"

     

     

     

    MicrosoftTeams-image (19).png
  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @N1loCan ,

     

    Can you confirm your locale? You can find it using the Language function: 

    BCBuizer_0-1675117136593.png

     

  • N1loCan Profile Picture
    62 on at

    Here it is, pt-BR

    N1loCan_0-1675173359587.png

     

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard