Comments on: Show/Hide Form Section by Name https://servicenowguru.com/system-definition/showhide-form-section/ ServiceNow Consulting Scripting Administration Development Thu, 07 Mar 2024 16:16:01 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Hi Ayyappa Swamy, https://servicenowguru.com/system-definition/showhide-form-section/#comment-8358 Fri, 13 May 2016 15:07:02 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8358 In reply to Ayyappa Swamy.

Currently we are on Eureka and planning to go for Geneva. So in Geneva I am facing the same issue..
like Menu list and right click broken.
Have you figured out this problem?
Thanks

]]>
By: John Cooper https://servicenowguru.com/system-definition/showhide-form-section/#comment-8357 Tue, 05 Jan 2016 21:35:47 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8357 I have tried almost every variation that has been presented here…I am trying to limit by role who can see a certain tab. I have used a business rule(display rule) to try and set a true false indicator on the person having tne desired role. then passing that along to get the if then to work. unfortunately i am not getting anywhere….also i am currently on Eureka. Will be moving to Geneva end of Q1

]]>
By: Kay Defa https://servicenowguru.com/system-definition/showhide-form-section/#comment-8356 Wed, 30 Dec 2015 22:47:22 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8356 Thanks – fixed my problem in Geneva.

]]>
By: Mark Stanger https://servicenowguru.com/system-definition/showhide-form-section/#comment-8355 Tue, 15 Dec 2015 04:36:08 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8355 In reply to Dale Hynes.

It should. I’ve updated the article.

]]>
By: Dale Hynes https://servicenowguru.com/system-definition/showhide-form-section/#comment-8354 Tue, 15 Dec 2015 04:33:58 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8354 In reply to Mark Stanger.

Mark – should that be corrected in both of the yellow highlighted areas above ?

The 2nd Fuji update still reads “Sections including spaces should use underscores in place of spaces”.

]]>
By: Nixie https://servicenowguru.com/system-definition/showhide-form-section/#comment-8353 Fri, 16 Oct 2015 06:56:46 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8353 For Slush bucket, to hide buttons we did:
var eps = document.querySelectorAll(‘#ep’);
eps[0].rows[0].style.display=”none”; //hide buttons

Now after Fuji patch upgrade, we cannot read property ‘0’ of undefined.
Is this also issue related with this?

]]>
By: Mark Stanger https://servicenowguru.com/system-definition/showhide-form-section/#comment-8352 Thu, 10 Sep 2015 19:37:16 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8352 In reply to Andrew Barnes.

Thank you. I’ve made the correction above.

]]>
By: Andrew Barnes https://servicenowguru.com/system-definition/showhide-form-section/#comment-8351 Thu, 10 Sep 2015 18:35:08 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8351 Amend the Fuji instructions:
As SimonB points out – the naming convention for sections with spaces is actually different than you list. Only the first space gets replaced with underscore – the rest are simply removed – http://wiki.servicenow.com/index.php?title=GlideForm_(g_form)#setSectionDisplay&gsc.tab=0

]]>
By: Ayyappa Swamy https://servicenowguru.com/system-definition/showhide-form-section/#comment-8350 Tue, 08 Sep 2015 11:44:22 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8350 Hi Mark,

I am working on Fuzi instance. In my requirement i am using below methods to hide the section on RITM table, And i am able to hide the section also. But while using these methods i am not able to set the menu list on the form and Filed dictionary options using right click.

1.var sections = g_form.getSections();
sections[1].style.display = ‘none’;

I am using your below script

2.g_form.setSectionDisplay(‘variables’, false);

I am using below your script to hide the section but no luck. It would be great help if you provide me the fix.

//Hide the section
var section = $$(‘span[tab_caption_raw=”Variables”]’)[0].select(‘span[id*=section.]’)[0];
section.hide();
//Hide the tab
$$(‘.tab_caption_text’).each(function(caption) {
if(caption.innerHTML == ‘Variables’){
caption.up(‘.tab_header’).hide();
}
});

Regards,
Ayyappa Swamy

]]>
By: SimonB https://servicenowguru.com/system-definition/showhide-form-section/#comment-8349 Wed, 15 Jul 2015 07:41:48 +0000 https://servicenowguru.wpengine.com/?p=3399#comment-8349 Quick correction if you have mult-word section headings you only need to replace the first space with an underscore all subsequent spaces should be removed, i.e. “Major Incident Notes” becomes major_incidentnotes

http://wiki.servicenow.com/index.php?title=GlideForm_%28g_form%29#setSectionDisplay&gsc.tab=0

]]>