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

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.

  • Verified Answer

    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"

  • 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)

     

  • 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) 

     

  • 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?

  • 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?

  • 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 ?

  • 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.