Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to Hide a variable on the portal? i have a variable on the portal which Iam hiding using a client script but on Portal it is getting retained.

Saurabh Singh3
Kilo Guru

Hi All,

May i please know, How to Hide a variable on the portal i have a variable on the portal which I am hiding using a client script

but on Portal it is getting retained no matter what.

I tried using the UI policy/client script and it doesn't work on portal.

Client script:

function onLoad(){

var url = top.location.href;

if(url.indexOf('/sp') > -1){

// this is sp page and hide the variable

g_form.setDisplay('fiedname', false);

}

}

ui policy:

g_form.setDisplay('fieldname', false);

This will be very helpful if I get a solution to this.

 

Thanks,

Saurabh

1 ACCEPTED SOLUTION

Apologies on the delay, I have got this fixed my self had to remove a few check boxes on the Availability tab. and it worked fine for me, removed field from the portal.

View solution in original post

13 REPLIES 13

Aman Kumar S
Kilo Patron

Pleas use g_form.setVisible("field_name", false);

Also, it will only work if your field is not mandatory, if it mandatory also add g_form.setMandatory("field_name",false);

g_form.setVisible("field_name", false);

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Hi Aman, thank you for your response i did try this as well but no luck the field stays on the portal post the creation of the request.

Hi Aman,

 

The script/ui policy works perfectly on the form level but on the portal this field stays back no matter what we do.

 

Regards,

S

 

Hope you have checked this:

find_real_file.png

Best Regards
Aman Kumar