I have a field called "The Procurement Vehicle is:" with two possible values, "New" or "Continued". If the field equals "New" then two sections on my request type should not be accessible to Contract Users. I have security groups separated, ie: Project Manager (FTE) and Project Manager (C). (Obviously where C equals Contractor.
All it's doing is setting the fields to be editiable by whatever security group is in the form field, and using a rule to dynamically add or remove your contractors security group to the field based on your trigger field.
your solution will work if the "The Procurement Vehicle is:" is filled in by another entity - not by the FTE / C security groups.
if the field is filled by these security groups, then your solution would not work since PPM does not evaluate request security and field level security until it is saved.
I am not aware of the full scenario, but if Andy's scenario assumes that the value of the "The Procurement Vehicle is:" field is present before these security groups need to act on the workflow, then your solution would definitely work.
--remember to kudos people who helped solve your problem
another possible solution could be to create a rule that checks on the value of the field and when the field value meets a certain condition, use setFieldVisible(false) in the rule for the fields that should not be shown when the condition is met.
Be informed that we still have issues on this function when the field is otherwise required and then (of course) also needs the additional rule with setFieldRequired(false). I think this was fixed in 8.03 but not sure about that off-hand.
1) you need to decide if the field(s) need to have the value checked on page load (which would make sense if they don't need to vanish for the same user in the moment that the condition field value changes) or field change.
2) If you make all fields of a section invisible this way, then you also automatically hide the section.
So, what I really want to do is drive the visability of an entire section based on the value of another field and security.. The Procurement Vehicle won't be in either of the sections I need to hide. The only way I would have to hide the two entire sections is if the "Procurement Vehicle Field Is:" is equal to "New", AND the user's security group is equal to "Project Manager (c)"
This would not, in anyway, effect their actions on the workflow, or any other section of the request type. Does that make sense?
Does everyone still stand by their current solution based on that description?
as long as I'm correctly assuming that the sections, based on the condition in the rule, STAY not needed for this request at a later stage and thus can stay hidden, then I stick with my statement. If condition "Procurement Vehicle Field Is:" is equal to "New", AND the user's security group is equal to "Project Manager (c)" in the condition, you use a UI-rule (either on page load or on field change) to hide the fields in the section, which then hides the section (header might stay) and this is kept this way unless (if field change is used) one of the conditions is changed. Thus, if you want to make sure everthing works, you might add another rule or status dependency that makes the value of the field non-editable when a certain value has been set - or maybe the field is required in that step and then the next step it is set non-editable.
Hope this makes sense.
Anyway, do a bit of testing beforehand to familiarize yourself with the UI-rules and results.
I could make the field visible ONLY to every security group except the (C), and then based on field value make it visible. Meaning, "If procurement vehicle is" is equal to "Continued" then make it visible to Contractors. Does that make sense? To me that is a different setting, but with the same desired outcome. Is that easier?
If that doesn't make sense, could you go into more detail to your original suggested outcome?
not sure if that's easier. To hide something based on one condition seems simpler to me than to hide it overall and only make it available when certain 'multiple' conditions are met. AFter all, the values for the field could contain any amount of valid values where you want to see the fields / section, but there is only ONE combination of values in the conditions upon which you want to hide them.
You'll have to experiment a bit to find out which one suits you best, my assumption.
I could make the field visible ONLY to every security group except the (C), and then based on field value make it visible.
Yup, this is what I was thinking with my original suggestion (which I still stand by :smileytongue:). You can set both visible & editable at the field level. However, the security change would not take effect immediately upon flipping the field's value...it would require at least a save & page reload. But if you can live with that, it would work.
How do I set a security group as a dependency?
You can't, in a rule, unless perhaps if you create a custom Java rule...or someone knows another way that I'm not aware of...?
I have set the status dependency of a field to required in the workbench. then, I created a UI rule to set the field as not required depending on some otehr field value. The rule is firing and in the front end, the field is shown as not required.
Issue : Inspite of the field being displayed as not required, I am getting "Request Details/User Data container still contains required elements" error. Please note that this error does not come when I set the status dependency of the field as not required in the workbench which confirms the fact that the issue is due to this field not due to any other field or userdata. The UI rule is set on "Page reload"