I want to display my form section based on the click of UI action

Pooja Khatri
Tera Contributor

Hi All ,

 

I have a requirement where whenever I click on a UI action names as 'Action needed' then it should display a form section .

 

How can I code it and implement this scenario ?

5 REPLIES 5

Mallidi Suma
Tera Guru

Hi @Pooja Khatri ,

 

Please use the below code in order to show a section on click of ui action button.

 

Code:-

function onclicking()
{
  g_form.setSectionDisplay('tohide_section', true);
/*replace tohide_section with your section name.... to get the section name ..try to execute the client script and print the "alert(g_form.getSectionNames());" and fetch the value from the alert value.*/
}
 
if(typeof(window) == undefined)
{
doserverstuff();
}
function doserverstuff()
{
return true;
}

Screenshot 2023-05-17 at 3.18.12 PM.png

 

Please mark my answer as helpful and mark it as an answer, if it helps you !!

 

Thanks & Regards,

Suma.

Hi @Mallidi Suma - There is already one function which has some different functionalities called from the onclick tab in my UI action .

 

Can I define two functions in the onClick tab in the UI action ?

Hi @Pooja Khatri ,

 

Write this line " g_form.setSectionDisplay('tohide_section', true);" inside the existing onClick function.

 

Please mark my answer as helpful and mark it as an answer, if it helps you !!

 

Thanks & Regards,

Suma.

Hi @Mallidi Suma - I Tried with this , but its not working out .. can you provide any other way in which I can implement it  ?