Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Error : formula uses a scope, which is not currently supported for an evaluation

(0) ShareShare
ReportReport
Posted on by 691

Hello,
I'm trying to display dates but it doesn't work. I have an error as shown in the screenshot below but I don't understand why.
The error in English: This formula uses a scope, which is not currently supported for an evaluation

 

s44_0-1658317428488.png

 

other screen :

s44_1-1658317727145.png

 

Can you help me please ? Thanks in advance 😞

  • Verified answer
    sperry1625 Profile Picture
    756 Super User 2024 Season 1 on at
    Re: Error : formula uses a scope, which is not currently supported for an evaluation

    That error is only telling you that it cannot evaluate the formula within the context. This happens sometimes when the Studio cannot ascertain the value of a particular variable in order to show the value / result of the formula. There is no error in your formula, it looks correct. You are adding days, ThisItem.Value, to your start value, varVideoFirstDayView (The date for the first date box in the upper left).

    If you highlight the varVideoFirstDayView variable name, what value does it show you? It should be 6/25/2022, using your formula. Your formulas are:

    Set( varVideoMonth, DateValue( Month( Today() ) & "/1/" & Year( Today() ) ) ); //First day of the current month
    Set( varVideoFirstDayView, DateAdd( varVideoMonth, -Weekday( ctxStartOfMonth ) + 1, Days ) ); // Date for upper left month grid
    // OR
    Set( varVideoFirstDayView, DateAdd( varVideoMonth, -Weekday( ctxStartOfMonth, 2 ), Days ) ); // Date for upper left month grid

    You need to add one to the Weekday value, or pass a "2" as the second parameter, to come up with the correct start date. NOTE: If your ThisItem.Value is one-based you don't need to do this.

    I assume that ThisItem.Value is a zero-based (See note above) index of some kind. You just keep adding the Value to the start date.

    Are your variables only set when you click the button?  If so, you need to select the button and what you have should work as expected.

     

    If this helps, please select this as the Solution.

     

    Thank you.

  • alaabitar Profile Picture
    1,503 Super User 2024 Season 1 on at
    Re: Error : formula uses a scope, which is not currently supported for an evaluation

    Hello,

     

    I think you should replace the ; by , inside the Set and DateAdd functions as the parameter seperator for functions is ","

     

    Best regards,

    Alaa

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard