Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Best Practice to Allow Duplicate IR Numbers Across Different Years in Health & Safety Incident Manag

mania
Tera Contributor

Hi Team,

 

We are working with the Health and Safety Incident Management module and using the sn_ohs_im_incident table.

By default, the Health & Safety incident number is auto-generated, for example:

HSINC0000001

However, the client does not want to use the auto-generated incident number as their primary reference. They want users to manually enter an IR Number provided by their organization.

To support this requirement, we created an IR Number field where users can manually enter the IR number. We also implemented validation to prevent duplicate IR numbers.

Current Requirement

The client has now introduced a year-based requirement.

For example:

User Year IR Number Expected Result

User A2026555Allow
User B2026555Restrict – duplicate in same year
User A2026555Already exists
User B2027555Allow – different year

So, the same IR Number should be unique only within the same year, but the same IR Number should be allowed to repeat in a different year.

What would be the best-practice approach in ServiceNow to implement this requirement?

 

The main goal is to ensure that:

IR Number must be unique within a year, but the same IR Number can be reused in subsequent years.

I would appreciate any recommendations on the ServiceNow best practice for implementing this.

 

Thanks!

0 REPLIES 0