- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 02:11 AM
Hi All,
I am stuck in middle, please help me to sort my issue,
for 1 problem if there are 5 incident records are related i want to get the first incident which is related to that problem and want to update some data in to that incident.
Let me know how to add the logic in the filter in business rule so i can get the first record only.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 02:26 AM
Hi,
at which place you are writing this script?
BR? if yes then on which table?
Actually there is no field which can help you determine which incident was first linked with the problem
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 02:36 AM
i am writing a BR on asmt_assessment_instance table from there i am populating some answers on Problem record similarly if there is any incident is tagged to that problem record i have to Glide it and need to populate some data in the incident as well.
yes correct, we don't have that field available directly , I can see that date stamp is available only in the activity log of that particular incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 03:08 AM
Hi,
then you cannot easily know which was the 1st incident which was linked to that problem
you can pick any random one
Please share the script you started
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 03:01 AM
Hey,
There is no straight ootb solution that can be applied here to figure out which problem was attached first with a incident since the relationships are maintained on incident table and not m2m table.
You might want to create a additional field on the incident, eg "Associated at" which will be of type Date time, which can be set via BR once problem field gets populated on incident form.
And now in your query on the basis of this new field you can orderBy to find the earliest one and then do what you want to do.
Again, its not a optimal solution but will fix what you are looking for
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 03:49 AM
yes using this way we can implement it , but instead of making it custom i am looking for OOB functionality if there is any.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 03:53 AM
Unfortunately, no.
Aman Kumar