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 / Problem with SET property
Power Apps
Answered

Problem with SET property

(0) ShareShare
ReportReport
Posted on by 8

Hello, 

 

I'm trying to build a powerapps calendar application, but to upgrade my calendar, i'm trying to use the "Set" function like " Set( _dateSelected, Today() );" or  "Set( _firstDayOfMonth, DateAdd( Today(), 1 - Day( Today() ), Days ) );" like in this documentation : https://docs.microsoft.com/fr-fr/powerapps/maker/canvas-apps/screen-templates/calendar-screen-overview

But this display a error, is the documentation outdated or am I doing something wrong ?

 

calendar3.PNG

 

Thanks for your answers.

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    You are missing a ";" in the end of Set

    Set(_dateSelected, Today() );

     

    If this does not solve your problem, please put the mouse over the error and tell me te error

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • nicolaslegall Profile Picture
    8 on at

    Hello @Nogueira1306 , thanks for your answer,

     

    Even with "Set( _dateSelected, Today() );", it's not working, and I got 2 errors "number of invalid arguments : 1 were received, 2 were expected", and "unexpected characters, the formula contains "ParentClose" while "error" is expected.".

     

    Moreover, when I overview the Set function, it tells me the syntax "Set(variable; value)", that's why i'm asking about documentation that is outdated.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Documentantion is notoutdated. That has to do with Power apps language and location.

    In US tehy use "," over ";". In Portugal we use ";" for example. YOu need to check your region

  • Verified answer
    WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    @nicolaslegall ,

    Depending on your region your code will be either

    Set(
     _dateSelected,
     Today()
    );
    Set(
     _firstDayOfMonth, 
     DateAdd(
     Today(),
    	 -1,
     Days
     )
    );
    Set(
     _firstDayInView,
     DateAdd(
     _firstDayOfMonth,
     -(Weekday(_firstDayOfMonth) - 2 + 1),
     Days
     )
    )

    or

    Set(
     _dateSelected;
     Today()
    );;
    Set(
     _firstDayOfMonth; 
     DateAdd(
     Today();
    	 -1;
     Days
     )
    );;
    Set(
     _firstDayInView;
     DateAdd(
     _firstDayOfMonth;
     -(Weekday(_firstDayOfMonth) - 2 + 1);
     Days
     )
    )
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @nicolaslegall ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

    Visit my blog Practical Power Apps

  • nicolaslegall Profile Picture
    8 on at

    Thanks you all, it worked ! I'm located in France that's why.

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