- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2020 10:28 AM
Hi All,
I have a list collector to allow user to select multiple values. When a user selects some value and move them from available to selected slush bucket and save the form, after the form loads, this list collector should be read-only.
How can I do this? I am unable to do it with UI policy which we check if field is not empty then make read-only but how to check for this one?-
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2020 10:40 AM
have you tried with onload client script ?
eg:
function onLoad() {
if(g_form.getValue('variable name').toString() !=''){
g_form.setReadOnly('variable name',true);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2020 10:40 AM
have you tried with onload client script ?
eg:
function onLoad() {
if(g_form.getValue('variable name').toString() !=''){
g_form.setReadOnly('variable name',true);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2020 10:47 AM
Hi
Write Onsubmit /update client script like blow on Catalog Task table.
Note: In my case I have taken list collector as sys_user table. Change the highlighted element ids based on your requirement.
function onLoad() {
document.getElementById('user_select_0').style.visibility ="hidden";
document.getElementById('user_select_0_title_row').style.visibility ="hidden";
document.getElementById('user_sys_user').style.visibility ="hidden";
document.getElementById('user_select_0_search_row').style.visibility ="hidden";
}
if it not help refer the following thread .
If it help mark helpful or correct
Thanks and regards
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2020 12:13 PM
hey ,
try below code it works,
function onLoad() {
g_form.setReadOnly('variable name',true);
}
kindly mark Correct and Helpful if applicable.
Regards,
Indrajit.