on ‎2022 Oct 16 1:12 PM
Hi Team,
I am trying to create a dynamic copy Data Action. The Data Action should Copy Actual data from the FromYear to the ToYear of the chosen Plan Version.
I have parameters for TargetVersion, FromYear and ToYear that I want to use for a dynamic copy. Could you please help me with the script code.
Request clarification before answering.
praveen.kumar334
You can try setting up the Standard Copy step to achieve the same. If you want to filter few measures to be copied you can add them to the filter as shown below

Define the From Period, To Period and Target version as prompts as below example for from period

When you run the Data Action, you will be prompted to selected the Target version, From period and To Period.

Hope this helps. Please upvote/accept if this helps.
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
Thanks for the info. But I want to achieve this through script. PFB screenshot of psuedo code, but it looks like it is missing something.

I am able to achieve the same functionality by hardcoding the year as shown below:
DATA([d/date] = "202201") = DATA([d/date] = "202112")But I don't want to hardcode the year.
Using Script to copy is easier if you want to copy last year actuals to current year plan/budget etc. With Script the challenge will be to get the destination time member dynamically. This is only feasible if we know the lookback/look forward period before hand. So the user parameter have to be change and instead of asking the ToYear, you have to use the look forward period . For e.g 3, This will copy Actual from From Year to Plan of From Year +3. Both DATA() and RESULTLOOKUP only support leaf members in syntax which will make it difficult for dynamic handling. Any reason you don't want to use the standard copy step as its designed to precisely handle these scenarios
Nikhil
Thanks for the info Nikhil. So you mean to say that we can use the parameter for source(base level) and use the lookback/look forward for the target year ? In that is the case, I am unable to get the parameter even for the target also. PFB screenshot where the parameter tab is in disabled mode.

Please let me know if i am missing anything.
Thanks.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.