0

I am developing a script to block submition of ASI Table variable of a date, but even when the blocking is in the condition and the condtion is not engaged it still gets executed.

var totalRowCount = expression.getTotalRowCount();
for(var rowIndex=0; rowIndex<totalRowCount; rowIndex++){
    variable0=expression.getValue(rowIndex, "ASIT::AUDIT SUMMARY::Audit Date");
    variable1=expression.getValue(rowIndex, "ASIT::AUDIT SUMMARY::FORM");
    if(variable0.value!=null && formatDate(variable0.value,'yyyy/MM/dd') > (formatDate("31/01/2017",'yyyy/MM/dd'))){
       variable0.message="...";
       expression.setReturn(rowIndex,variable0);
       variable1.blockSubmit=true;
       expression.setReturn(rowIndex,variable1);
    }
}
0

I have resolved this question by changing (rowIndex,variable1) setReturn for a Form to (variable1),it means the Form will only be blocked by condition within the Form, but not in the Audit Summary Form.

variable1.blockSubmit=true;
expression.setReturn(variable1);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.