- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 10:07 PM
Hello Experts,
I have one requirement, which is used to hide the two fields based on client script.
I have the onchange client script but it is not working, could you please help on this.
var group = g_form.getReference('assignment_group').indexOf("network") > -1;
if (group == true) {
g_form.setVisible('u_vendor_name', false);
g_form.setVisible('u_vendor_ticket', false);
} else {
g_form.setVisible('u_vendor_name', true);
g_form.setVisible('u_vendor_ticket', true);
}
Thanks
@Ankur Bawiskar @Palani Kumar @Ravi Chandra_K @Samaksh Wani
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 01:08 AM
@Samaksh Wani , From onchange client script is not working so i done through ui policy.
it is working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 11:59 PM
Hello @anonymous13
The use case is not the unique network group.
It should check for all groups containing group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 12:41 AM
@Ravi Chandra_K , We have 21 assignment group contain network. which one needs to take the sysid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 12:23 AM
Hello @Santhosh15
var group = g_form.getReference('assignment_group', callbackF);
function callbackF(group){
if (group.name.contains('network')){
g_form.setVisible('u_vendor_name', true);
g_form.setVisible('u_vendor_ticket', true);
} else {
g_form.setVisible('u_vendor_name', false);
g_form.setVisible('u_vendor_ticket', false);
}
}
try this :-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 01:08 AM
@Samaksh Wani , From onchange client script is not working so i done through ui policy.
it is working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2023 07:00 AM
Hello @Santhosh15
Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.
Regards,
Samaksh