cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the Global Variable

Former Member
0 Kudos

Hi

I have created RadioButtonGroupByKey UI element in the WD view.

I set values for that UI element in the WdInit() of the view.

ISimpleTypeModifiable reportType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("ReportType");;

IModifiableSimpleValueSet reportValues=reportType.getSVServices().getModifiableSimpleValueSet();

reportValues.put("0","Status");

reportValues.put("1","Order Status");

wdContext.currentContextElement().setReportType("0");

now the problem is when want to changed the value of "Status" to " Customer Status" At runtime

I am not able to access the reportType or reportValues variable from the action method.

so please let me know if i want to access these where i need declare

ISimpleTypeModifiable reportType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("ReportType");;

IModifiableSimpleValueSet reportValues=reportType.getSVServices().getModifiableSimpleValueSet();

reportValues.put("0","Status");

reportValues.put("1","Order Status");

wdContext.currentContextElement().setReportType("0");

regards

mmukesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mukesh

You can repeat the same code whenever you require to change the enumeration value. You can absolutely write the same piece of code in your action method. I dont see any problem with that.

ISimpleTypeModifiable reportType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("ReportType");;
IModifiableSimpleValueSet reportValues=reportType.getSVServices().getModifiableSimpleValueSet();
reportValues.clear();
reportValues.put("0","Customer Status");
reportValues.put("1","Order Status"); 
wdContext.currentContextElement().setReportType("0");

Where is the problem?

Regards

kk