Skip to main content
madhup0003
March 3, 2022
Question

How to call two interface through radio button

  • March 3, 2022
  • 3 replies
  • 0 views

Hello, can anyone help me for below case

I just want to create two interface and what i want , if I call those two interface through a radio button so what approached i need to use for the same.

    3 replies

    gopalk2865
    Participating Frequently
    March 3, 2022

    Hi, You can configure two radio buttons and these two buttons you can save boolean values, and once its set as true , something like below,

    a!localVariables(
      local!isRule1Visible:false,
      local!isRule2Visible:false,
      {
        a!radioButtonField(
          label: "Radio button 1",
          choiceLabels: {"yes","No"},
          choiceValues: {true,false},
          value: local!isRule1Visible,
          saveInto: local!isRule1Visible
        ),
        a!radioButtonField(
          label: "Radio button 2",
          choiceLabels: {"yes","No"},
          choiceValues: {true,false},
          value: local!isRule2Visible,
          saveInto: local!isRule2Visible
        ),
        if(
          local!isRule1Visible,
          rule!interface1,
          {}
        ),
        if(
          local!isRule2VisibleVisible,
          rule!interface2,
          {}
        )
      }
    )

    madhup0003
    March 3, 2022

    This code is working but it's showing only a value in the form of true or false. I want to show data of the both interfaces

    mikes0011
    Brainy
    March 3, 2022

    This will depend completely on what you have in your interface rules that you call.  The example code above with "rule!interface1" and "rule!interface2" is purely an example of how to implement such an interface picker - you will need to supply your own interface names in place of the above.

    The Expression Guru