cancel
Showing results for 
Search instead for 
Did you mean: 

Using Current Date Input Control in SAC Advanced Filters

david46
Discoverer
0 Kudos
166

Hello everyone,

I am trying to setup advanced filters to dynamically set the cutover date of a planning table in SAC. I have already been able to do this using the system date. In this case, it automatically sets the cutover date to the current year automatically on January 1st of every year. It shows the Actuals for past years and PLanning Values for the current and future years. 

However if I am trying to make this cutover year date switch sometime during the year, say March 1st instead of Jan 1st, I will have to use the Current Date Input Control and somehow modify this Current Date Input Control using script. I have not been able to find a way to interact with this Current Date Input Cotrol in script. Is there an API for this? I am able to change Dimension Filters and also Story Filters and Variables using the SetDimensionFilterwith Hierarchy and the GetFileDataSource API's. I want to do the same for the Current Date Input Control.

Screenshot 2024-11-04 223231.jpgScreenshot 2024-11-04 223305.jpgScreenshot 2024-11-04 223356.jpg

 

Thanks!

 

David

 

View Entire Topic
William_Yu
Product and Topic Expert
Product and Topic Expert
0 Kudos

Have you tried API: Application.setCurrentDateTime();

david46
Discoverer
0 Kudos
Yes, that works to set the Input Control! Great! I have tried it with a static year, 2024 in my case. Trying to figure out if there is a way to set it to: If the month is march or later, set the date to this year, otherwise it should stay at the previous year. Any suggestion?
david46
Discoverer
0 Kudos

Current Code is:

david46_0-1730804259177.png

 

William_Yu
Product and Topic Expert
Product and Topic Expert
0 Kudos
I believe this should be possible to do via some JS coding if else stuff.