Highlighted
Absent Member.
Absent Member.
301 views

Need to display Approve ,Deny and Retract buttons conditionally

Hi Team ,

I checked the condition for all the 3 display options(Approve,Deny and Retract) and it is same as of respective out of box display options and it is :

evaluate(app.control in $L.phase) and lng(denull(approval.groups in $L.env))>0 and evaluate(approvals in $L.env) and open in $L.filed=true
and (lng($L.approval.intersect)>0 or approve.override in $L.env) and nullsub($G.ess, false)=false

Now if i take example of form " Approval.g " and screen Id "approval.view" there the Display options are working as expected , e.g if one approver has approve the change then he is only able to see " Retract " and like wise for other scenarios. So i checked and found the display option conditon for
"approval.view_approve" is "$L.can.approve"
For "approval.view_deny" is "$L.can.approve"
And for "approval.view_retract" is "$L.can.retract"

Now my question is what this $L.can.approve and $L.can.retract stands for (what values they are holding) , where can i find them ??
Also the main issue is can i use the same variables on my main form " cm.change.approval " and Screen Id " cm.view.display" for the 3 display options(Approve,Deny and Retract) .
And if not then how can i achieve the same funtionality as on form " Approval.g " and screen Id "approval.view" on my main form i.e "cm.change.approval " and Screen Id " cm.view.display" for the 3 display options(Approve,Deny and Retract) .

Regards,
Nikhil

0 Likes
1 Reply
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Need to display Approve ,Deny and Retract buttons conditionally

Those variables are set in the displayscreen record both for the approval record and for changes/tasks.

 

The out of box conditions for the application modules  function that way already; if you copy the condition from those to the display options which you added then to the cm.view.display toolbar, it should already work exactly as described.  If you are working wiht a custom displayscreen, you can copy the relevant lines from cm.view.display.

$L.appr.query="file.name=\""+str(filename($L.filed))+"\" and unique.key=\""+number in $L.filed+"\""

$L.delegate.name=jscall("ApprovalUtil.checkDelegate", $L.appr.query, str(filename($L.filed)));$L.ame($L.filed)));$Lapproval.groups=jscall("ApprovalDelegationGroups.addDelegateGroups", approval.groups in $L.env, str(filename($L.filed)))

$L.void=rtecall("intersect", $L.err, $L.approval.intersect, $L.approval.groups, current.pending.groups in $L.filed);$L.void=rtecall("intersect", $L.err, $L.retract.intersect, approval.groups in $L.env, approved.groups in $L.filed)

The first line just sets up the query used in next line. The second line generates the $L.approval.groups array of groups for which a person may approve, including those for which they have current delegated authority. The third line generates the $L.approval.intersect and $L.retract.intersect that determine "can approve/deny" and "can retract".

 

Note: any user with Change Override capability will see all three options at all times. 

 

This is a duplicate of your existing topic. Please close one of them. 

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
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.