We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Default Form Section Expansion on Load in Workplace

Berta
ServiceNow Employee

Is there a way to ensure that all sections of a form are expanded by default when it loads( workspace) , regardless of whether those sections were previously minimised on other records?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Berta 

this worked for me in onLoad client script, this works in workspace only

function onLoad() {
    //Type appropriate comment here, and begin script below
    g_aw.setSectionExpanded('impact', true);
    g_aw.setSectionExpanded('assignment', true);
    g_aw.setSectionExpanded('cause', true);
    g_aw.setSectionExpanded('resolution', true);
    g_aw.setSectionExpanded('related_records', true);
    g_aw.setSectionExpanded('incident', true); // main section
}

Output

auto expand section sow.gif

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

1 REPLY 1

Ankur Bawiskar
Tera Patron

@Berta 

this worked for me in onLoad client script, this works in workspace only

function onLoad() {
    //Type appropriate comment here, and begin script below
    g_aw.setSectionExpanded('impact', true);
    g_aw.setSectionExpanded('assignment', true);
    g_aw.setSectionExpanded('cause', true);
    g_aw.setSectionExpanded('resolution', true);
    g_aw.setSectionExpanded('related_records', true);
    g_aw.setSectionExpanded('incident', true); // main section
}

Output

auto expand section sow.gif

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader