1 Reply Latest reply on Oct 5, 2011 2:42 PM by philmodjunk

    I need help

    lhrusovsky

      Title

      I need help

      Post

      I have a field that is populated with 6 radio buttons. Depending on which radio button is chosen, a different term is printed in  another field. The text color is also changed. I have tried the "if" and "case" functions and tried to nestle each. I keep geting a dialog of to many parameters when I try to nestle the functions beyond two. I know there must be a way to do this, but I'm hittting a brick wall. Help

        • 1. Re: I need help
          philmodjunk

          SHouldn't be any need to nest IF or Case functions here.

          Say your value list has 3 radio button values: Apple, Orange and Kiwi

          Case ( RadioButtonField = "Apple" ; "Apple was selected" ;
                    RadioButtonField = "Orange" ; "Orange was selected" ;
                    RadioButtonField = "Kiwi" ; "Kiwi was selected"
                  )

          Illustrates how to have different text in the field based on the value selected in the radio button field. To do this with six radio buttons, you'd just add 3 more lines where test the value and specify the text to be returned. To specify a color, you have two options. YOu can set up a conditional format expressions for the field that specify the displayed text color. They'd look something like this:

          Table::RadioButtonField = "Apple" //specify Red colored text format
          Table::RadioButtonField = "Orange" //Specify orange colored text
          Table::RadiobuttonField = "Kiwi" //Specify green text

          For 6 values in the radiobutton field, you'd add 3 more conditinal format expressions with appropriate colors specified.

          You can also use the textColor function with the original case function instead of conditional formats:

          Case ( RadioButtonField = "Apple" ; TextColor ( "Apple was selected" ; RGB ( 255; 0 ; 0 ) ) ; //Red text
                    RadioButtonField = "Orange" ; TextColor ( "Orange was selected" ; RGB ( 0; 0 ; 255 ) ) ; //Blue text
                    RadioButtonField = "Kiwi" ; TextColor ( "Kiwi was selected" ; RGB ( 0; 255 ; 0) )  //Green text
                  )