The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Hide the details section from incident form

Swapnil Meshram
Mega Guru

Hello Experts,

Hide the details section from incident form when details section is empty .Could help me in the script part.

SwapnilMeshram_0-1728895018144.png

 

2 REPLIES 2

Shubham_Jain
Mega Sage

@Swapnil Meshram  Create OnLoad Client Script to handle: 

function onLoad() {
  // Get the value of the Details field
  var details = g_form.getValue('u_details'); // Replace 'u_details' with the actual field name for Details
  
  // Check if Details field is empty
  if (!details) {
    // Hide the Details section if it's empty
    g_form.setSectionDisplay('details_section', false); // Replace 'details_section' with the actual section name
  }
}

Hit the helpful button if it solves. 

 

✔️ If this solves your issue, please mark it as Correct.


✔️ If you found it helpful, please mark it as Helpful.



Shubham Jain


Moin Kazi
Kilo Sage
Kilo Sage

Hi @Swapnil Meshram ,

 

Please review the community post below, which may be helpful to you.

 

Solved: Re: For a Particular form view make a section's fi... - ServiceNow Community

Solved: Re: For a Particular form view make a section's fi... - ServiceNow Community

Mark MoinKazi_0-1728896121351.png Correct if this solves your issue and also mark MoinKazi_1-1728896121352.pngHelpful if you find my response worthy based on the impact.

 

Regards

Moin