The CreatorCon Call for Content is officially open! Get started here.

RITM backend table mandatory field -visibility

SivaranjaniR
ServiceNow Employee
ServiceNow Employee
 

I created a Service Catalog item using App Engine Studio. All variables were set as mandatory = false, and I used Catalog UI Policies (applied to both Catalog Item and Request Item) to make certain fields mandatory on the form.

However, when I submit the request:

  • The Request Item (RITM) gets created successfully.

    • A record is generated in the backend table.

    • Some backend fields are dictionary-mandatory but were not filled from the RITM.

    • These fields are also visible on the backend record form, even though no value was provided.

    Expected:
    If a value is not entered in the RITM, the backend fields should either remain hidden or not show up at all.

    Ask:

    • How can I ensure the backend fields stay hidden when no value is passed from the RITM?

    • Should I manage this with Flow Designer mapping, backend UI Policies, or adjust the table dictionary?

2fcf2b7d97c072d02af3fff3a253af1c.png

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@SivaranjaniR 

you can use separate onLoad catalog client scripts which Applies on Requested Item and hide the empty variables on RITM form

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@SivaranjaniR 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

kaushal_snow
Mega Sage

Hi @SivaranjaniR ,

 

Please consider adjusting the field's dictionary attributes by setting the Mandatory attribute to false and ensuring that the Visible attribute is set to false for the backend form, as this prevents the field from appearing on the form when not populated. Additionally, create a UI Policy on the sc_req_item table that targets the specific field, set the condition to check if the field is populated, and if not, set the field's visibility to false, ensuring that the field remains hidden unless explicitly populated. In your Flow Designer logic, when creating or updating the RITM record, ensure that you only map values to the backend fields if they are populated in the Service Catalog item, preventing unnecessary data from being written to the backend fields...

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/