Duplicate sub state choices getting created in for Hardware Asset Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 03:51 AM
Hi Team,
Recently we found that the "substate" choices are getting created automatically for the Hardware Asset Table. On analyzing it we found that there is a custom flow for the Hardware Asset Refresh Task where we see the duplicate choices are coming from.
Attached is the screenshot of the flow for your reference.
Please suggest.
Regards
Alia Naz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 04:09 AM
@Alia It might be the value from Old Asset Substate may not match any existing choice in sys_choice for alm_hardware.substate. and When the flow runs and sets substate = "SomeUnregisteredValue", ServiceNow auto-creates that as a new choice in sys_choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 04:31 AM - edited 05-14-2025 04:31 AM
The values are present in sys_choice table for the substate field still creating duplicate choices. Is there a way to avoid this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 04:36 AM
@Alia can you
Ensure that you're setting the field using the value, not the label, and match it exactly. Other side, If substate is dependent on state, ensure your flow sets both fields properly, or remove dependency if not required.
OR
You can add a script step in your flow that checks if the substate exists in sys_choice with the correct name, element, value, and optionally dependent_value.