cancel
Showing results for 
Search instead for 
Did you mean: 

How to read value entered in an inputcontrol of advanced story into the data action advanced formula

innokeyits
Explorer
0 Kudos

Hi Experts,

I have a custom story, where some parametets would be entered by the user in a InputField box. for example a number 51.6, and then I need to use this number in the Advanced Formula in a data action. 

I can use slider widget as well. 

How can I do that? The number can be changed while using the story and see the affects of it. 

Thanks in advance,

-SP

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor

@innokeyits 

Add a slider and configure it as per your needs. You will not be able to use Data Action trigger in this case. So you can use button to trigger the Data Action. I have set the target version as Actuals but you can assign it from input control or dropdown etc. as per your requirement.

N1kh1l_1-1710271782795.png

Button with script on press

var factor=Slider_1.getValue();
DataAction_1.setParameterValue("Factor",factor);
DataAction_1.setParameterValue("TargetVersion","public.Actual");
if(DataAction_1.execute()){
Application.showMessage(ApplicationMessageType.Success,"DA run succesfully");
Application.refreshData();
}

I also create a parameter in Data Action to accept this slider value.

N1kh1l_0-1710271730455.png

Simple Advanced Formula

MEMBERSET [d/ZACCOUNT_TEST]="SALARY"
MEMBERSET [d/Date]="202401"

DATA([d/ZACCOUNT_TEST]="SALARYPREV12")=RESULTLOOKUP()*%Factor%

 

Output:

N1kh1l_2-1710271904028.png

Br.

Nikhil

innokeyits
Explorer
0 Kudos
Thank you very much, Nikhil. Sorry it took sometime. So, I had to understand that DataAction has to be created and link that to the DataAction_1 script variable of type DataAction. Thanks.

Answers (0)