Highlighted
Honored Contributor.
Honored Contributor.
701 views

What does this variable mean? $L.approval.intersect

Jump to solution
Hi experts, I have to know, what does these below line does. $L.approval.intersect, app.control in $L.phase, approvals in $L.env what kind of values these variable will be holding? when i checked in RAD Debugger. I got the values. but i have to know the exact meaning of that variable. evaluate(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 Regards, Shalini R
0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: What does this variable mean? $L.approval.intersect

Jump to solution

$L.approval.intersect is a variable generated within the 'approval.init' RAD application on panel 'check.can.approve'

The short answer is, this variable is an array that lists out all the users and groups this particular user can approve for.

The long answer -
In this line of code on the 'check.can.approve' panel of the 'approval.init' RAD application 

$L.void=rtecall("intersect", $L.err, $L.approval.intersect, $L.groups, current.pending.groups in $L.approval+future.groups in $L.approval)

There is an rtecall 'intersect' used to compare the contents of two arrays and return an array containing all the values they have in common.  The rtecall is not documented, but it's basically:

Function
rtecall("intersect")
Format
$L.void=rtecall($L.fnc.name, $L.errorcode, $L.returnArray, $L.arrayOne, $L.arrayTwo)
Parameters
$L.fnc.name | String | The name of the function to call (in this case, "intersect")
$L.errorcode | Number | The number of the error code encountered (if any)
$L.returnArray | Array | An array containing all the elements that are in both $L.arrayOne and $L.arrayTwo
$L.arrayOne | Array | An array of values you wish to compare
$L.arrayTwo | Array | A second array of values you wish to compare

Example
$L.void=rtecall("intersect", $L.err, $L.returnArray, {"Pete", "Joe", "Paul", "Steve"}, {"Mike", "Joe", "Ethan", "Pete"})
After running, the value of $L.returnArray = {"Pete", "Joe} because those elements appear in both input arrays.

In the case of the Approval record, the $L.groups array is generated by other code in that approval.init RAD application and is basically a list of all the people and groups (in total, including delegates) that this particular operator COULD approve for, and then the system compares that array to the current and future approvers within THIS SPECIFIC Approval record, and returns an array of values if there are any matching values between those two arrays.

View solution in original post

2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: What does this variable mean? $L.approval.intersect

Jump to solution

I found this in the approval.init RAD app:

$L.void=rtecall("intersect", $L.err, $L.approval.intersect, $L.groups, current.pending.groups in $L.approval+future.groups in $L.approval)

This probably looks to see if you belong to an approval group that is either listed as a current pending group or a future group that will need to approval.  If it finds something, $L.approval.intersect will list out those approval groups.

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: What does this variable mean? $L.approval.intersect

Jump to solution

$L.approval.intersect is a variable generated within the 'approval.init' RAD application on panel 'check.can.approve'

The short answer is, this variable is an array that lists out all the users and groups this particular user can approve for.

The long answer -
In this line of code on the 'check.can.approve' panel of the 'approval.init' RAD application 

$L.void=rtecall("intersect", $L.err, $L.approval.intersect, $L.groups, current.pending.groups in $L.approval+future.groups in $L.approval)

There is an rtecall 'intersect' used to compare the contents of two arrays and return an array containing all the values they have in common.  The rtecall is not documented, but it's basically:

Function
rtecall("intersect")
Format
$L.void=rtecall($L.fnc.name, $L.errorcode, $L.returnArray, $L.arrayOne, $L.arrayTwo)
Parameters
$L.fnc.name | String | The name of the function to call (in this case, "intersect")
$L.errorcode | Number | The number of the error code encountered (if any)
$L.returnArray | Array | An array containing all the elements that are in both $L.arrayOne and $L.arrayTwo
$L.arrayOne | Array | An array of values you wish to compare
$L.arrayTwo | Array | A second array of values you wish to compare

Example
$L.void=rtecall("intersect", $L.err, $L.returnArray, {"Pete", "Joe", "Paul", "Steve"}, {"Mike", "Joe", "Ethan", "Pete"})
After running, the value of $L.returnArray = {"Pete", "Joe} because those elements appear in both input arrays.

In the case of the Approval record, the $L.groups array is generated by other code in that approval.init RAD application and is basically a list of all the people and groups (in total, including delegates) that this particular operator COULD approve for, and then the system compares that array to the current and future approvers within THIS SPECIFIC Approval record, and returns an array of values if there are any matching values between those two arrays.

View solution in original post

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.