Highlighted
Honored Contributor.
Honored Contributor.
837 views

Approal inbox

Jump to solution

Hi expert, i need to assign to read-only checkbox when the deadline for approval is greater than the current date. 
In displayscreen "approval.inbox" I have the following line:

 

for $L.i = 1 to $L.show do (if (not null($L.i in $L.ids) and lng($L.i in $L.ids)>0) then ($L.fechalimitapro=jscall("Approvalloc.fechalimitapro", $L.i in $L.ids);$L.temp="$L.fechalimitapro."+$L.i+"=\""+$L.fechalimitapro+"\"";$L.void=evaluate(parse($L.temp, 11))))

 

With the buttons "approve / deny" I have no problem because I have the condition in OJ I put a condition on each button eg "tod () <val ($ L.fechalimitapro.1, 3)" but not how to do the same with the checkbox.

 

 

Any suggestions?

 

Regard,

Juan

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.
Honored Contributor.

Hi expert, after various tests I found the solution.

 

1) JL: Approvalloc 
Add a new function:

 

   function fechalimitaproTF(id)
{
    var result = new Array();
    result = id.split(" ");
    var cm = new SCFile("cm3r");
    var is = cm.doSelect("number = \"" + result[1] + "\"");
    var date = system.functions.tod();
    if (is == RC_SUCCESS) {
        if (date < cm.YPF_FechaLimiteAprob) {
            return (true);
        }
        if (date > cm.YPF_FechaLimiteAprob) {
            return (false);
        }
    }
}

 

2) DS: approval.inbox.display 
Add the following line:

 

for $L.i = 1 to $L.show do (if (not null($L.i in $L.ids) and lng($L.i in $L.ids)>0) then ($L.fechalimitaproTF=jscall("Approvalloc.fechalimitaproTF", $L.i in $L.ids);$L.temp="$L.fechalimitaproTF."+$L.i+"=\""+$L.fechalimitaproTF+"\"";$L.void=evaluate(parse($L.temp, 11))))

 

3) FD: approval.inbox.display 

In each of the "checkbox" add to the condition of "read-only" as follows: 
[$ L.fechalimitaproTF.1] = "false"


Thank you very much to all!!

 

View solution in original post

3 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Hi,

 

Did you try readonly condition in properties for chechbox?

 

Regards,

Abhijit K

Highlighted
Honored Contributor.
Honored Contributor.

Yes, but I do not let the condition "tod()<val($L.fechalimitapro.1, 3)"
That would be my best condition to enter the Read-Only

 

Tks

Juan

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Hi expert, after various tests I found the solution.

 

1) JL: Approvalloc 
Add a new function:

 

   function fechalimitaproTF(id)
{
    var result = new Array();
    result = id.split(" ");
    var cm = new SCFile("cm3r");
    var is = cm.doSelect("number = \"" + result[1] + "\"");
    var date = system.functions.tod();
    if (is == RC_SUCCESS) {
        if (date < cm.YPF_FechaLimiteAprob) {
            return (true);
        }
        if (date > cm.YPF_FechaLimiteAprob) {
            return (false);
        }
    }
}

 

2) DS: approval.inbox.display 
Add the following line:

 

for $L.i = 1 to $L.show do (if (not null($L.i in $L.ids) and lng($L.i in $L.ids)>0) then ($L.fechalimitaproTF=jscall("Approvalloc.fechalimitaproTF", $L.i in $L.ids);$L.temp="$L.fechalimitaproTF."+$L.i+"=\""+$L.fechalimitaproTF+"\"";$L.void=evaluate(parse($L.temp, 11))))

 

3) FD: approval.inbox.display 

In each of the "checkbox" add to the condition of "read-only" as follows: 
[$ L.fechalimitaproTF.1] = "false"


Thank you very much to all!!

 

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.