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 / 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
    153,073 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
    153,073 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
    153,073 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard