Focal Point
[SOLVED] Maintain radio button set dymanically

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3617002826

January 24, 2013, 02:42 PM
brad-s
[SOLVED] Maintain radio button set dymanically
I have a maintain form that contains a radio button with just two columns/options.
It contains two radio button columns
1-Amount with value of A
and 2-Percent with value of P

Before I open the form, I want to dymanically set the selection of that radio button based on the value from a stack.

If the value of from the stack variable = P, how do I set the selection to the second column radio button with the Pecent before I show the form?

This message has been edited. Last edited by: Kerry,


Brad S.
WF 8.05 / Win7 /Tomcat Self Serve
January 24, 2013, 03:10 PM
Maintain Wizard
Brad
There are 2 ways to do this. If the Radiobutton is tied to a stack, then you JUST need to change the Focindex of the stack. If the values of the RadioButton are hardcoded, then use the ListItems code below. Remember to use Show_inactive first.

Winform Show_Inactive Form1;
compute stk.focindex = 2;
COMPUTE Form1.RadioButton2.ListItems.FocIndex = 2;
Winform Show Form1;

Mark
January 24, 2013, 03:37 PM
brad-s
SOLVED

Works great.
From your solution, I removed the references to the stack: stk as it did not apply here.


Brad S.
WF 8.05 / Win7 /Tomcat Self Serve