Regarding use of radio button

Dear All,
   I add two radio button in my form. And they work. One button for 'male' and another for 'female'.
When i click male button then it sends '1' to database in the respective field and
when i click female button then it sends '2' to database.
But i need 'M' for male and 'F' for female.
what is the solution.
Good day.
                                                                              Regards
                                                             Bodhisatya Bhattacharjee

Try something like this for the first Option button ...
        Dim oOptionBtn As SAPbouiCOM.OptionBtn
        With oItem
            .Left = 100
            .Top = 100
            .Width = 50
            .Height = 20
            oOptionBtn = .Specific
        End With
        With oOptionBtn ' data bind
            .Caption = strCaption
            .ValOn = 'M'
            .ValOff = 'F'
            If Len(strGroupWith) > 0 Then .GroupWith(strGroupWith) ' Use tihis to group the option buttons
            If Len(Trim(strFieldName)) > 0 Then .DataBind.SetBound(True, "", "FIELD1")
        End With
and then set the
ValOn = 'F'
and .
ValOff = 'M'
for the other button.
hope it works for you
null

Similar Messages

  • Using the radio button component to go to a frame on a MovieClip

    hello,
    I am using the radio button component in Flash with a continue button.
    When the user clicks their option in the radio button and then clicks continue, I want it to go to a movieClips Specific frame.
    Here is the breakdown and the script I have so far is below.
    The radio group os named RadioButtonGroup
    The instance names for each of the three options are noviceButton,intermediateButton,expertButton
    My continue button has an instance name of continueButton
    and my movie clip I am trying to target has an instance name of level_mc
    here is my code so far:
    continueButton.enabled=false
    noviceButton.addEventListener(MouseEvent.CLICK, revealContinue);
    intermediateButton.addEventListener(MouseEvent.CLICK, revealContinue);
    expertButton.addEventListener(MouseEvent.CLICK, revealContinue);
    function revealContinue(evt){
        continueButton.enabled=true;
    continueButton.addEventListener(MouseEvent.CLICK, clickContinue);
    function clickContinue(evt){
    var frameNumber=mc_levels.Number(noviceButton.group.selectedData)
    gotoAndStop (frameNumber);
    the problem starts with my varFrame line-I don't know how to get it to go to the movieClip and gotoAndStop at a specific frame, based on which radio button was clicked and after the continue button is clicked.
    Does anyone out there have any ideas?
    thanks
    babs

    use:
    continueButton.enabled=false
    noviceButton.addEventListener(MouseEvent.CLICK, revealContinue);
    intermediateButton.addEventListener(MouseEvent.CLICK, revealContinue);
    expertButton.addEventListener(MouseEvent.CLICK, revealContinue);
    function revealContinue(evt){
        continueButton.enabled=true;
    continueButton.addEventListener(MouseEvent.CLICK, clickContinue);
    function clickContinue(evt){
    var frameNumber=mc_levels.Number(noviceButton.group.selectedData)
    level_mc.gotoAndStop (frameNumber);

  • How to write a numeric value to a plc register using a radio button

    I'm want display a HOA (HAND/OFF/AUTO) on my screen. Lookout is connected to a Allen Bradley PLC. I am trying to write to a "N" register. I want to write a zero to open all (eg) N7:10 bits, writing a one (1) will close a contact N7:10/0 and writing a two (2) will close N7:10/1 etc. How do I do it? Can I use a radio button and if so, how?

    ICI,
    Just wanted to let you know that you have posted your question in the
    MATRIXx part of the forum.  There is a specific board for
    Lookout.  If you repost your message there you will be more likely
    to get a good answer.
    Carl L
    National Instruments

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

  • Using CheckBox / Radio-Button Control in Dialog Program

    Dear Friends,
    Please let me know the way to use check-box / radio-button control in dialog programs. Where & how to define them & write the logic.
    If possible provide a small example.
    Regards,
    Alok.

    Hi,
    goto tcode abapdocu.. abap user dialogs - screens-processing screens you will get examples for all --pushbutt6ons radiobutton checkboxes everything
    <b>here is a sample code for you</b>
    PROGRAM demo_dynpro_check_radio .
    DATA: radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
          field1(10) TYPE c, field2(10) TYPE c, field3(10) TYPE c,
          box TYPE c.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    CALL SCREEN 100.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'RADIO'.
          IF radio1 = 'X'.
            field1 = 'Selected!'.
            CLEAR: field2, field3.
          ELSEIF radio2 = 'X'.
            field2 = 'Selected!'.
            CLEAR: field1, field3.
          ELSEIF radio3 = 'X'.
            field3 = 'Selected!'.
            CLEAR: field1, field2.
          ENDIF.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.
    <b>flow logic:</b>
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    regards,
    pankaj singh.
    <i><b>
    reward if helpful</b></i>

  • Regarding processing of radio Button

    hi,
    i have 2 radio buttons on top of selection-screen and i have 2 parameters on the selection-screen.
    By selecting one radio button,one among 2 parameters is ready for input and that parameter i ahve to made as Mandatory field....
    How can we do it....
    Help me.....
    Nice answers are rewarded with Maxi Points...

    Hi Subhas,
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER R1 RADIOBUTTON GROUP G1 USER-COMMAND UC.
    PARAMETER p_EBELN TYPE EKKO-EBELN MODIF ID S1.
    PARAMETER R2 RADIOBUTTON GROUP G1.
    PARAMETER P_MATNR TYPE MARA-MATNR MODIF ID S2.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN OUTPUT ****
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF R1 = 'X'.
    IF SCREEN-GROUP1 = 'S1'
    SCREEN-REQUIRED = 1.
    MODIFY SCREEN.
    CLEAR SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'S2'.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
    CLEAR SCREEN.
    ENDIF.
    ENDIF.
    IF R2 = 'X'.
    IF SCREEN-GROUP1 = 'S2'
    SCREEN-REQUIRED = 1.
    MODIFY SCREEN.
    CLEAR SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'S1'.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
    CLEAR SCREEN.
    ENDIF.
    ENDLOOP.
    Try this code. it'll solve your requirement.
    Reward if useful.
    Regards
    ANUPAM

  • Using a Radio Button to Disable Multiple Checkboxes

    Hi everyone,
    My name is Christian and I am trying to design a form using Adobe Designer 7 that when a user selects a group of two radio buttons (one marked Macintosh and one marked Windows) it automatically disables 3 or 4 checkboxes of various software applications further down the page.
    The idea is if you select the Windows radio button, you would not be able to select the iWorks or StuffIT checkboxes (as that is Mac software), but conversely if you check Macintosh radio button the iWorks and StuffIT checkboxes activate but the Office 2003 and Microsoft Money checkboxes deactivate (because that is Windows software).
    Im not really a developer so any assistance would be appreciated. Thanks for reading and have a great day! :-)
    Christian

    I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
    <!--- contents of input.cfm --->
    <html>
    <head>
         <title>Input</title>
    </head>
    <body>
         <form action="action.cfm" method="POST">
              Choose type: <br />
              <input name="type" type="radio" value="male" />     Male<br />
              <input name="type" type="radio" value="female" /> Female<br />
              <input type="submit" />
         </form>
    </body>
    </html>
    <!--- content of action.cfm --->
    <html>
    <head>
         <title>Action</title>
    </head>
    <body>
         <cfif form.type eq "male">
              Type is male.
         <cfelseif form.type eq "female">
              Type is female.
         </cfif>
         Here is a cfdump of the form variables:<br />
         <cfdump var="#form#" />
    </body>
    </html>
    Message was edited by: JR "Bob" Dobbs
    Added sample for action.cfm

  • Get the row of a department in a popup using a radio button

    I have a use case. A page will be displayed with a button. User will click on that button, and then a popup will be displayed showing the table of departments. User will select the desired radio button. After that, the popup will close and the list of employees should get displayed in the page.
    I have written a method in the valuechangeevent property of the radio button (autosubmit is also set as true), but still I am not able to get the current row. I actually need the value of departmentid.
    Can anyone guide me?
        public void onClickRadio(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            System.out.println("onClickRadio Begins");
            hidePopup("p1");
            DCBindingContainer bc =
                (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            DCIteratorBinding iter =
                bc.findIteratorBinding("DepartmentsView1Iterator");
            Row row = iter.getCurrentRow();
            Number departmentId = (Number)row.getAttribute("DepartmentId");
            System.out.println("departmentId: " + departmentId);
            OperationBinding method =
                (OperationBinding)bc.get("displayEmployeeTable");
            method.getParamsMap().put("departmentId", departmentId);
            method.execute();
            AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
            System.out.println("onClickRadio Ends");
        }JDev 11.1.1.6

    This is the code of the popup.
            <af:popup id="p1" contentDelivery="lazyUncached">
              <af:dialog id="d2" type="none">
                <af:table value="#{bindings.DepartmentsView1.collectionModel}"
                          var="row" rows="#{bindings.DepartmentsView1.rangeSize}"
                          emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                          fetchSize="#{bindings.DepartmentsView1.rangeSize}"
                          rowBandingInterval="0"
                          selectedRowKeys="#{bindings.DepartmentsView1.collectionModel.selectedRow}"
                          selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
                          rowSelection="single" id="t1">
                  <af:column sortProperty="Radio" sortable="false" id="c1"
                             width="20">
                    <af:selectBooleanRadio value="#{row.Radio}" id="ot3"
                                           valueChangeListener="#{myBean.onClickRadio}"/>
                  </af:column>
                  <af:column sortProperty="DepartmentId" sortable="false"
                             headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
                             id="c2">
                    <af:outputText value="#{row.DepartmentId}" id="ot2">
                      <af:convertNumber groupingUsed="false"
                                        pattern="#{bindings.DepartmentsView1.hints.DepartmentId.format}"/>
                    </af:outputText>
                  </af:column>
                  <af:column sortProperty="DepartmentName" sortable="false"
                             headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}"
                             id="c3">
                    <af:outputText value="#{row.DepartmentName}" id="ot1"/>
                  </af:column>
                </af:table>
              </af:dialog>
            </af:popup>I think that when I select the radio button, the value might be getting true of the column, but this isn't setting the current row.
    Also in the log I am getting these messages:
    <SimpleSelectBooleanRadioRenderer> <renderGroupAttribute> The selectBooleanRadio component's group attribute is null. It must be set to a non-null value for the selectBooleanRadio component to function properly. The selectBooleanRadio component is meant to be used with other selectBooleanRadio components with the same group value.

  • Hidden, Visible and back to Hidden using a radio button

    Ok this might be really simple for someone to answer.
    I have a radio button I'm using to toggle between two list boxes with multiple lines of text (hidden and then visible). Here's the problem, when I toggle the radio button back and forth I have both list boxes displaying thier notes at the same time. I would like to have the radio button display one messages at a time when you toggle between them. Here is my script.
    Radio Button named Violation:
    form1.#pageSet[0].Page1.#subform[0].action[1].Violation::click - (JavaScript, client)
    if (this.rawValue == null) {
         Notes.presence = "hidden";
    else {
         Notes.presence = "visible";
    Radio Button named Suspension:
    form1.#pageSet[0].Page1.#subform[0].action[1].Suspension::click - (JavaScript, client)
    if (this.rawValue == null) {
         Notes2.presence = "hidden";
    else {
         Notes2.presence = "visible";

    Notes and Notes2 are list boxes. Violation and Suspension are radio buttons. Is that correct? If so, are Violation and Suspension in an exclusion group?
    Is this the requirement, Violation should display Notes and hide Notes2 and Suspension should hide Notes and display Notes2?
    Steve

  • Using a radio button in cfmail / form.

    Hello;
    This is a silly question, but I can't remember how to program in radio buttons for a cfmailer. I have 3 radio buttons, basically, I just need to know what the users choice was when they checked it off. The following is my radio buttons and what I have for code right now. But I'm not grabbing the proper variable, I also tried dumping a few diffrerent variables to see if I could get it.
    <input name="type" type="radio" onClick="setVisibility('sub3', 'inline');setVisibility('sub4','none');setVisibility('sub5','none');" value='male' checked="checked"/>Magnets
    <input type="radio" name="type" value='female' onClick="setVisibility('sub3', 'none');setVisibility('sub4','inline');setVisibility('sub5', 'none');"/>Paper Steel
    <input type="radio" name="type" value='child' onClick="setVisibility('sub3', 'none');setVisibility('sub4','none');setVisibility('sub5', 'inline');"/> both
    on my response page, I tried this:
    <cfif form.type EQ "male">
    if this was their choice, then this set of rules would apply
    </cfif>
    and so on for the other two choices. This isn't catching my buttons, what am I doing wrong? do I need to make a paramiter for the radio buttons before I can allow it to function? like this?
    <cfparam name="FORM.type" default="">
    then I can use my if statement? (that isn't working right now either)
    here is what I'm trying to dump:
    <cfdump var="#form.type#">
    <cfabort>
    </cfdump>
    How do I do this? Can anyone help me?

    I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
    <!--- contents of input.cfm --->
    <html>
    <head>
         <title>Input</title>
    </head>
    <body>
         <form action="action.cfm" method="POST">
              Choose type: <br />
              <input name="type" type="radio" value="male" />     Male<br />
              <input name="type" type="radio" value="female" /> Female<br />
              <input type="submit" />
         </form>
    </body>
    </html>
    <!--- content of action.cfm --->
    <html>
    <head>
         <title>Action</title>
    </head>
    <body>
         <cfif form.type eq "male">
              Type is male.
         <cfelseif form.type eq "female">
              Type is female.
         </cfif>
         Here is a cfdump of the form variables:<br />
         <cfdump var="#form#" />
    </body>
    </html>
    Message was edited by: JR "Bob" Dobbs
    Added sample for action.cfm

  • Using a radio button to populate another group of radio buttons?

    I am new to Adobe forms and new to Javascript. I have a question on my form with a radio button group (PHQ) with four choices 1, 2, 3 or 4. If the user chooses "1", I want a check to appear in the "No" box for another radio button group (Screen). If, on the other hand, the user chooses 2, 3, or 4, from the PHQ group, I want a check to appear in the "Yes" box of the Screen group. Is this possible? Not sure how to go about doing this.

    I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
    <!--- contents of input.cfm --->
    <html>
    <head>
         <title>Input</title>
    </head>
    <body>
         <form action="action.cfm" method="POST">
              Choose type: <br />
              <input name="type" type="radio" value="male" />     Male<br />
              <input name="type" type="radio" value="female" /> Female<br />
              <input type="submit" />
         </form>
    </body>
    </html>
    <!--- content of action.cfm --->
    <html>
    <head>
         <title>Action</title>
    </head>
    <body>
         <cfif form.type eq "male">
              Type is male.
         <cfelseif form.type eq "female">
              Type is female.
         </cfif>
         Here is a cfdump of the form variables:<br />
         <cfdump var="#form#" />
    </body>
    </html>
    Message was edited by: JR "Bob" Dobbs
    Added sample for action.cfm

  • Autofill a radio button using other radio buttons

    I would like a question on my form "Q24 Decrease Smoke" (set of "Yes"/"No" radio buttons) to auto fill with a response of "No" if the user selects "Not at all" to 3 other questions (also sets of radio buttons).  If the user selects any other response to any of these 3 questions, I want the user to be able to manually select either "Yes" or "No". This is the code that I've tried, under the Mouse Up event of the "No" radio button option for Q24:
    var a = getField("Q20 Smoke Cig").value;
    var b = getField("Q22 Smoke other forms").value;
    var c = getField("Q23 chew/snuff").value;
    if(a=="Not at all" && b=="Not at all" && c=="Not at all") event.value = "On";
    I'm new to Javascript, so am not entirely sure I am on the right track or what might be wrong here. Any help would be greatly appreciated. Thanks!

    Have you tried to the set the value to to "No"?
    The "Mouse Up" action only works when there is a "Mouse Up" action for the field.
    I would look at using the script in the 'On Blur" action for the 3 fields with adjustments for the fields as needed for the field where the script is used.

  • Use of radio button in presentation..

    How do we use radio buttons in a presenattion?
    What is the refrenced type for that? Can it be enum only?
    If this is so how do we catch the value selected by the user through screenflows or code in a process?

    Frequently you need to choose among few values to set an BPM Object attribute that represents for instance Levels - High, Medium, Low -, Position - Top, Bottom -, etc. In these cases a Radio Button is very useful to show it.
    The attribute should be set as Int with Valid Values, with this option you can associate each valid value with a description.
    Unfortunately you can use enumerations but if you use BPM Object attributes you could return the selected value from the presentation to the process.
    The BPM Object that you use in the interactive activity should be a ScreenFlow variable and get its attributes from the end activity to set a returned value.
    Hope that helps you.

  • Effective use of Radio Buttons In dealing with input fields.

    Hello All
    Based on the selection made in the radio buttons, is it possible to either hide or display particular field(ex: a MessageTextInput field) in an ADF UIX form Page. If yes can anyone help me out onhow to accomplish this task. Thanks in Advance.
    Regards,
    Arun.V

    Hi Roeland,
    can you explain in detail what exactly needs to be done?
    'copy a range to a specific area on change (see the first data tab, the large white field). '
    I am assuming 'The large white field' you have mentioned is 'Data Insertion' in 'General tab'
    This section contains Series. I have created two series 1. Yes 2. No
    Now what will be the 'Insertion Type' value so that if I select 'Yes' then 4 columns will be copied and for 'No' 2 columns will be copied.

  • Use of radio buttons in xcelsius

    Hi,
    I have a requirement where user will be provided with a radio button to hide/ unhide certain columns of a table for which the source data will be in the excel worksheet.
    For example: Show Description?   OYes     ONo
    and based on the user input columns will be shown in the report.
    How can I implement this with the help of xcelsius?

    Hi Roeland,
    can you explain in detail what exactly needs to be done?
    'copy a range to a specific area on change (see the first data tab, the large white field). '
    I am assuming 'The large white field' you have mentioned is 'Data Insertion' in 'General tab'
    This section contains Series. I have created two series 1. Yes 2. No
    Now what will be the 'Insertion Type' value so that if I select 'Yes' then 4 columns will be copied and for 'No' 2 columns will be copied.

Maybe you are looking for

  • How do I get all iTunes songs including Cds added, from 1 computer (Windows) to new iMac

    Just got new Imac having problems getting all of current library which is on other PC transfered to new Imac. Can anyone advise of a process? Thanks in advance, Don

  • My iMac screen is black

    When I turn on my iMac it starts fine but when it comes to showing the display screen all I get is a black screen.  I have run several troubleshooting tests and trials and nothing is helping. My iMac is from 2008 and has a 24" screen. Can anyone help

  • Float values - loss of precision

    Hi all. float f = 123.456789f; DecimalFormat df = new DecimalFormat("0.00000000000000"); System.out.println(df.format(f)); Gives me the result "123,456710937500" Not even close! why?!, Using a double works just fine, but I cannot do that due automate

  • PRINTING FORMAT NOT CORRECT

    Hi Experts, Iam Ramya, I am new to Basis Can anybody help me, I am facing a printing problem. When user is tring to print, Print preview is Ok but print is not ok. Thanks in Advance

  • Modify style of page layout

    Hello, I have created a layout consisting of a wide left and narrow right area. Now I would like to assign grey background color for the right area. Any ideas how to achieve this? Thanks in advance, Elmar