Skip navigation
Currently Being Moderated

Radio Button correct value for referencing

Jun 22, 2012 7:09 AM

Am really struggling with a particular Radio Button, and feel I'm missing using the right case value.  Am using similar code throughout the form radio buttons, but in this case I've tried making the case Y, Yes, 1, with and without quotes, =, ==, and nothing works yet.  The button is in a table cell, no subform and the response in the table cell below, no subform.  The binding value on the button - value is 1, Item = Yes, value 2, Item = No.  Appreciate any help, thank you!

 

 

switch (this.rawValue)
{
    case "Y":
    Response12BN.presence = "invisible";
    xfa.host.messageBox("Attach a copy of your company’s safety manual and safety incentive programs.""SAFETY PROGRAM ATTACHMENTS", 3, 1); 
 
    break; 
    
    case "N":
    Response12BN.presence = "visible";
    Response12BN.rawValue = xfa.host.response("Please enter the reason you do not have a Written Safety Program here", "WRITTEN SAFETY PROGRAM");
    break; 
 
}
 
Replies
  • Currently Being Moderated
    Jun 22, 2012 8:30 AM   in reply to sparrowce

    Hi,

     

    Reasonable straightforward. You just need to use the bound values of the radio button (1 or 2):

     

    switch (this.rawValue)
    {
        case "1":
        Response12BN.presence = "invisible";
        xfa.host.messageBox("Attach a copy of your company’s safety manual and safety incentive programs.",  "SAFETY PROGRAM ATTACHMENTS", 3, 1); 
        break; 
    
        case "2":
        Response12BN.presence = "visible";
        Response12BN.rawValue = xfa.host.response("Please enter the reason you do not have a Written Safety Program here", "WRITTEN SAFETY PROGRAM");
        break; 
    }
    

     

    Should work,

     

    Niall

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points