cancel
Showing results for 
Search instead for 
Did you mean: 

Loading data to Planning enabled Model through Analytical application Scripting

rpsamy
Explorer
0 Kudos
321

We have Planning Model which required planning data from Excel received the data using Custom Widget table data http response, processing the data via Analytical application Button click Script below:

rpsamy_0-1718035633648.png

 

Table_1.getPlanning().setEnabled(true);

Table_1.getPlanning().setUserInput(lselection, rawVal );

Table_1.getPlanning().submitData();

Clicking the button – browser debugger shows an error.

rpsamy_1-1718035633651.png

 

Any help would be appreciated!

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

Hi JefB 

Thank you so much looking in to this issue:

Which I can edit and publish via story, unblock the selection input

rpsamy_0-1718273539421.png

 

Story after publish the data - See simple Table_1.getDataSource().getResultSet()

rpsamy_1-1718273539427.png

 

Simple Account dimension Model with 3 dimension Account, Project & Time.

Same intersession of data

  • Same Account
  • Same Project
  • Same Time
  • SignedData change to different.

getPlanning().setUserInput – also very simple

rpsamy_2-1718273539430.png

 

  

Expected the submitData  should change rawValue of the account 94000 à 45000

But always getting the error :

rpsamy_3-1718273539436.png

 

Any lead could help to fix this script. Really appreciated talking time to looks deep into this issue.

JefB
Active Contributor
0 Kudos
Try to remove the decimals from "45000.00", e.g. "45000" and try to add Version dimension to the column axis.
JefB
Active Contributor
also, check try to output Table_1.getSelections() in console with table onClick() event and compare this to your supplied selection values
rpsamy
Explorer
0 Kudos
Table_1.getSelections() --> Account : "[Account].[parentId].&[Commited]" ITP_SN_PROJECT : "PRJ0036782" Time : "202401" similar setting to selection Table_1.getPlanning().setUserInput({ "Version" : "public.Actual" , "Account":"[Account].[parentId].&[Commited]" , "ITP_SN_PROJECT":"PROJ20230025", "Time": "[202401]" }, "45000" ); still having the same error
rpsamy
Explorer
0 Kudos
Table_1.getSelections() include version in Column { Account : "[Account].[parentId].&[Commited]" ITP_SN_PROJECT : "PRJ0036782" Time : "202401" Version : "public.Actual"} , exactly same columns selection Table_1.getPlanning().setUserInput({ "Account":"[Account].[parentId].&[Commited]" , "ITP_SN_PROJECT":"PROJ20230025", "Time": "[202401]", "Version":"public.Actual" }, "45000" ) - still error "Sorry, we couldn't carry out your data entry because one or more conditions for entering data haven’t been met. "
rpsamy
Explorer
0 Kudos
JefB - Thank you your help work now Selection switch to format like lv_selections = {Account: '[Account].[parentId].&[Amount]', Version: 'public.Actual', CustomDimension1: 'SignedData', ITP_SN_PROJECT: 'PRJ0036782', Time: '202401'}; var input = Table_1.getPlanning().setUserInput(lv_selections, "34000" ); all works as expected. Much Appreciated valuable time.