You have the option to hide or disable an entire form by using JavaScript Expressions, within a service option click on the attached form.
The form definition box will appear and you will see Disable and Hidden fields, which you can add JavaScript expressions to return true/false based on object properties.
See Page 350 of SC 12.9 Admin Guide.
Examples follow:
■ To hide or disable the form when the request status is Pending Approval, enter
the following JavaScript expression in the Hidden or Disabled field:
$(_.request.status == 400).
■ To hide or disable the form for end user roles only, enter $(_.user.role ==
‘enduser’).
■ To hide or disable the form from all business units except ca.com, enter
$(_.bu.id != ‘ca.com’).
■ To disable the form when the request status is Fulfilled, enter
$(_.request.status == 2000).
I want to know how can you hide a form based on the group a user might be part of. When using firebug console in firefox and calling user.groups it returns all the groups within an array.
How would you check for a group in a javascript expression without somehow looping through each array item to check?