This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jul 22, 2011, 3:52 PM
10 Posts

Problems computing a field from a radio button choice.

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: @if function
  • Replies: 1
I have a Checkbox Group that is computing it's selection values based on a Radio Button Group on the same XPage.  The following code is in the values of the Checkbox.  The Radio Button field name is COApproval
 

@If(COApproval="Yes",@DbLookup(@DbName(),"Groups","Classification Officers",2),COApproval="No","Not Required","No Selection Made");

 
 
The problem I'm experiencing is that the first condition in the @if function is the one that is selected no matter what the actual value of the field is.  I'm new to XPages and I'm sure this is a syntax type problem, but, I can't find an answer.
 
Any help would be greatly appreciated.
 
MJ   

Jul 22, 2011, 7:00 PM
31 Posts
Re: Problems computing a field from a radio button choice.
MJ, you need to use the "value" of the radiobuttongroup.  So if your radioButtonGroup has an ID = "COApproval", you would use: getComponent("COApproval").value in your @If statement.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal