cancel
Showing results for 
Search instead for 
Did you mean: 

How to update or change Model variable when user enter the value in inputfield box in sac

thayumanavan
Explorer
0 Kudos

At run time the prompt screen appears and we pass the values in selection screen and report appears based on the selection. Now my requirement is i have to pass prompt value in one variable and based on that i want to pass the measure in chart. Is this possible please let me know

Accepted Solutions (0)

Answers (1)

Answers (1)

PRAT280
Advisor
Advisor
0 Kudos

Hi,

I think you should explore giving users option to select a measure using a radio button or checkbox instead of adding it as model variables. If you still want to go on this route, you can try something as below

1. Create a number variable

2. In Desc you can add like 1 = Amount | 2 = Quantity | 3 = Price

3. In the report you can add a script logic to filter measure based on model variable value( like If 1 = Amount Measure). THis assumes you are on story 2.0

thanks

thayumanavan
Explorer
0 Kudos

Hi pratyush_panda ,

I Used the below code it worked for me

weeknumber= ConvertUtils.stringToInteger(InputField_1.getValue());

Chart_2.getDataSource().setVariableValue("ZFVWEEKNUM",weeknumber);

Chart_2.getDataSource().getVariableValues("ZFVWEEKNUM");

Chart_2.getDataSource().refreshData();