- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2022 10:45 PM
Hi All,
In flow designer I have 2 catalog task in task 1 all variables should be read only , after close the task another task is created here the variable should be editable. Tried UI policy as well.
Please advice!
Thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2022 11:05 PM
Hello,
Write onload client script like below, Make sure you add 'short description' which exactly points to Task 1 only....
function onLoad() {
var short =g_form.getValue('short_description');
if(short =='This is task1')
{
g_form.setVariablesReadOnly(true);
}
}
Mark my answer as correct if that helps
Regards
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2022 11:03 PM
Hi you can write a onload client script on sc task table and look for closed state value
var state = g_form.getValue('state');// closed state value
if(state == '2' )
{
g_form.setVariablesReadOnly(true);
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 12:26 AM
Thank you, This is also working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2022 11:05 PM
Hello,
Write onload client script like below, Make sure you add 'short description' which exactly points to Task 1 only....
function onLoad() {
var short =g_form.getValue('short_description');
if(short =='This is task1')
{
g_form.setVariablesReadOnly(true);
}
}
Mark my answer as correct if that helps
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 12:01 AM
Hi Musab Rasheed,
Thank you this script working fine but I have Mandatory field it should be update only in task 2 in task 1 it should be readonly.