How to script in a Wait for Condition in a FLOW

Meloper
Kilo Sage

i tried this

Meloper_0-1675761846405.png

 

if(fd_data._4__create_task.record.work_notes.changes() && (fd_data._4__create_task.record.sys_updated_by == fd_data._4__create_task.record.opened_for.name)){
    return true;
}else{
    return false;
}

 but get this error:

Meloper_1-1675761920825.png

should i use answer instead of return?

3 REPLIES 3

dharanikumar
Giga Guru

Did you got the solution please?

Hi, not really, i update ACL.
User is only able to change the Work Note.
So i checked if updated by was a User or an admin with the data pill and not the script

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @Meloper ,

 

Try :

 

(function() {
    if (fd_data._4__create_task.record.work_notes.changes() && fd_data._4__create_task.record.sys_updated_by == fd_data._4__create_task.record.opened_for.name) {
        return true; 
    } else {
        return false;
    }
})();

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect