Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
933 views

How to set a field to editable only for users with certain capability index

Jump to solution

Good evening experts,

 

I have a quick question to ask of you all. I have an issue with users changing dates once they have been set and approved. Is there a way that certain fields can be set to read only during a certain phase?

Or could it be set to read only unless you has a certain capability index?

Is there a way to make the entire form read only but have certain fields editable during a phase?

I might be over thinking it and there could be something done in the workflow. Not sure.

 

HPSM 9.40 Codeless with Process Designer

 

Thank you for your help.

 

 

Thank you for your help.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to set a field to editable only for users with certain capability index

Jump to solution

You should make some settings in 2 places:

1) FC

- In Initialization expressions use some temp variable, for example $CanChange

$CanChange=false;if (index("YourCAPWords", $lo.ucapex)>0) then ($CanChange=true)

2)FD 

On your form for the field set condition for read only:

[$CanChange]<>"true"

You can add also more conditions with it, like: 

[$CanChange]<>"true" & [status]<>"pending"

View solution in original post

7 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to set a field to editable only for users with certain capability index

Jump to solution

You should make some settings in 2 places:

1) FC

- In Initialization expressions use some temp variable, for example $CanChange

$CanChange=false;if (index("YourCAPWords", $lo.ucapex)>0) then ($CanChange=true)

2)FD 

On your form for the field set condition for read only:

[$CanChange]<>"true"

You can add also more conditions with it, like: 

[$CanChange]<>"true" & [status]<>"pending"

View solution in original post

Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: How to set a field to editable only for users with certain capability index

Jump to solution

Good morning ALARMus,

 

Thank you so much for your quick response and your help with this issue. We really do thank you.

 

One more question what if I needed to add another CAPWORD? Should there be two statements with each CAPWORD with a pipe ( | ) between the statements or is there a way to add both in one statement?

$CanChange=false;if (index("YourCAPWords", $lo.ucapex)>0) then ($CanChange=true)

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to set a field to editable only for users with certain capability index

Jump to solution

1) You can create CapWord special for this case, so add new one CapWord that you created to operators you need.

If for some reason you can not use method 1)

2) You can set new condition on next line in initialization expressions 

$CanChange=false;if (index("YourCAPWords1", $lo.ucapex)>0) then ($CanChange=true)

if (index("YourCAPWords2", $lo.ucapex)>0) then ($CanChange=true)

3) You can use AND, OR  operators (to set it in one line)

$CanChange=false;if (index("YourCAPWords1", $lo.ucapex)>0 and index("YourCAPWords2", $lo.ucapex)>0) then ($CanChange=true) 

 

Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: How to set a field to editable only for users with certain capability index

Jump to solution

Good morning,

Thanks for all of your help with this issue. I put this in place and it is working GREAT!!!

 

One more question to ask of you. Now that this has been in place we have it to the point now that we need this in place but we need all users to be able to attach files.

 

Is there a way that we can just open up attachments?

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: How to set a field to editable only for users with certain capability index

Jump to solution

Good morning,

Thanks for all of your help with this issue. I put this in place and it is working GREAT!!!

 

One more question to ask of you. Now that this has been in place we have it to the point now that we need this in place but we need all users to be able to attach files.

 

Is there a way that we can just open up attachments?

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to set a field to editable only for users with certain capability index

Jump to solution

I'm not sure what you want. Which users are we talking about (ess or index) ?

And where should you be able to add attachments ?

0 Likes
Highlighted
Account_Closed
Not applicable

Re: How to set a field to editable only for users with certain capability index

Jump to solution

Good evening,

 

Thank you for answering the question. What is going on i that some user might have to provide tet cases or updte test cases.

With the orginal way that we had it was that the users would have to go thru the Change Management team to add attachments.

So the only other way around this was for me to go field by field for the read-only.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.