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



Sep 24, 2012, 1:21 PM
6 Posts

Enable Radio and set combo box programatically

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role:
  • Tags: Radio,combo box
  • Replies: 1
Hi,
I need to enable the radio button programatically on load of the page based on the query string of the page.
I added the following formula for each radio button under 'Selected By default' property.

var idkey=param.get("idkey");

if (idkey != null){

var doc:NotesDocument = database.getDocumentByUNID(idkey);

if (doc != null){

if(doc.getItemValueString("abc")=="xyz"){

return true;' not sure which property i can use to enable.

}

}

}

I added the similar formula for the combo box as well, but it didnt helped much. Tried with beforePageload option as well.
Please help. Thanks in advance
Sep 24, 2012, 2:19 PM
366 Posts
Re: Enable Radio and set combo box programatically
 Set a session scope variable in the XPage events and then set the radio button / check box components default value to be computed dynamically with code like the following
 

var urlvalscopevar = "thisString";

if(urlvalscopevar == "thisString"){

return "C";

}
 
the checkbox group default value is only available in the all properties view 

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