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 / Why does my Set functi...
Power Apps
Answered

Why does my Set function not allow me to create any var

(0) ShareShare
ReportReport
Posted on by 122

Hi!

I'm new to power apps and this is my first time creating a canva app. I was trying to create a collection in onStart function of the App. Turns out I can't create any var with Set or clearCollect -which I understand by some vids is the way of creating vars in power apps- because it shows an error:

  • With Set
    JuanArango_0-1703040455665.png

    Translation: "Number of args is not valid: 1 was received, 2 were expected"

  • With clearCollect
    JuanArango_1-1703040573548.png

    Translation: the name is not valid. "IceCream" is not recognized.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,479 Most Valuable Professional on at

    Hi @JuanArango ,

    Try this instead

    Set(
     Icecream,
     Table(
     {
     Flavor: "Strawberry",
     Quantity: 300
     }
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • JuanArango Profile Picture
    122 on at

    @WarrenBelz Hi!

    With the given code I get two errors, the first being the same Set error as before, and the second one "Unexpected characters. The formula contains 'Colon' where 'ParentClose' was expected": 

    JuanArango_0-1703042153750.png

     

  • WarrenBelz Profile Picture
    155,479 Most Valuable Professional on at

    @JuanArango ,

    Please see corrected post

  • JuanArango Profile Picture
    122 on at

    @WarrenBelz I changed it as said,

    I get the same Set error and "Unexpected characters. The formula contains 'Error' where 'ParentClose' was expected"  :

    JuanArango_0-1703044761353.png

     

  • JuanArango Profile Picture
    122 on at

    @WarrenBelz Actually I'm noticing that no function is working at all.

    Take this conditional for example in the fill prop of a component: 

    If(AppBarButton.isActive,RGBA(237,26,59,1),RGBA(0,0,0,0));

    It should work fine I understand, but instead it shows these errors:

    • Translation: "Number of args is not valid: 1 was received, 2 were expected"
      JuanArango_0-1703045792299.png
    • Translation: "Unexpected characters. The formula contains 'Error' where 'ParentClose' was expected
      JuanArango_1-1703045851446.png

       

  • Verified answer
    WarrenBelz Profile Picture
    155,479 Most Valuable Professional on at

    Hi @JuanArango ,

    What country are you in ? You may need European syntax

    Set(
     Icecream;
     Table(
     {
     Flavor: "Strawberry";
     Quantity: 300
     }
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • JuanArango Profile Picture
    122 on at

    @WarrenBelz Yup it was European Syntax (I´m in Colombia). 

    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 Launch!

Jump in, show your community spirit, and win prizes!

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 432

#2
Valantis Profile Picture

Valantis 362

#3
timl Profile Picture

timl 337 Super User 2026 Season 1

Last 30 days Overall leaderboard