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 29, 2011, 5:51 PM
25 Posts

How to display and not display a link on an xpage

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 2
 I have a link on an xpage.. I want to display it if the user has the HelpDesk user role and the status is not = "Pending Submittal"
 
The first bit seems to work hthe HasRole.. but not the second
 
var v:Array = database.queryAccessRoles(session.getEffectiveUserName());

var hasRole
hasRole =@IsMember("[HelpDesk]", v);
var statCheck
statCheck = document1.getItemValue("Status");
var h
h = @If(hasRole,statCheck = "Pending Submittal","DS","S");
h=="S"
 
I'm not sure what I am doing incorrect. Probably a bunch of things..
 
Thanks in advance for any help.
Sep 29, 2011, 6:18 PM
25 Posts
Re: How to display and not display a link on an xpage
 Elizabeth,
 
The line in your code: 
 
var statCheck;
statCheck = document1.getItemValue("Status");

getItemValue returns a vector. So you probably want: 
 
statCheck = document1.getItemValue("Status").get(0); 
 
or 
 
statCheck = document1.getItemValueString("Status"); 
 
HTH
Sep 29, 2011, 6:30 PM
25 Posts
Re: How to display and not display a link on an xpage
Thank you thank you thank you.!!

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