Visible on summaries

Bartosz Nowak2
Kilo Guru

Dear Community,

 

is it possible to control somehow the Visible on Summaries variable on Service Portal? I just need to set up this via the script as I have the requirements that it should show/hide depends of options selected. ( its the variable sets - one of the Variable)

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

You will need to query item_option_new table record for your variable to update visible_summary flag dynamically.

You will need to use GlideAjax from your client script to achieve like above.

 

Regards,

Sachin

Hello Sachin we have the exact same issue and question, are you able to provide examples of how you would code the query and update the flag?

kamleshraj0
Tera Contributor

Hi
Answer to your question yes we have 2 option as far as discover
Option 1: - Create 2 Display BR to run on every loading.

 

  • Script runs in a Business Rule on sc_req_item / sysapproval_approver (RITM/ Approval).

  • Inside BRs fetch the Catalog Item and the action type (for ex Join,  Retire) from the RITM variables.

  • It queries all variables (item_option_new) of that catalog item -- In your case specific variable set).

  • You can copy the encodedQuery from the Variables table.
  • Based on the actionType: loop

    • Join → hides some variables (Variable 11, Variable 1,…) and shows others.

    • Retire → hides a different set (Var1, Var4, Var7…) and shows others.

  • For each variable, it updates the field visible_summary = true/false to control visibility in the summary.

  • visible on summary Field is available in Variable > Availablity Section


Option 2: - Use OnSubmit client script on Catalog Item and Clear the values.
- If you really wanted to Hide >> this solution will not work rather it will clear the Default values if you have any on your Variable Set>Variables. To avoid any confusion to the approver. 

kamleshraj0_0-1755695182656.png

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.


Regards
Kamlesh.