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.