- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 10:39 AM
Hello,
I'm currently noticing that Values for Boolean fields on a metric are being set as Date time values instead of "True" or "False" values, if you see the image the idea of that metric is to check Field value changes , is there any way to make this to be a True/False value instead of that Date time string?
This is the field:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 12:22 PM
I found the root cause, There are 2 Fields with the same label one was a Boolean and the other is date / time this caused confusion and we pick the wrong one, update on metric definition has been applied and we are getting the correct data, as I mentioned before there's a business rule that inserts the field display value into the metric instance "Value" field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 03:32 AM
Hi @GM5
I think it is expected behaviour, I tried this in my PDI and got same results. the reason can be
As this calculate the duration, try with other option script calcualtion. but I doubt any thing will be changed.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 06:40 AM
What about the Other fields on the screenshot? These aren't Boolean type every time a user perform a change on the value of the field a new metric instance is created and we are able to see the new value, see the attached image. Basically this report is feed by a Database view between our custom table and the metrics table (ServiceNow suggest there's an OOTB database view for Change and other tables to fulfill the same requirement without using the audit table) .
Thanks anyways.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 06:52 AM
Hi @GM5
LNG_P is a boolean type, which was created on the Incident table test your use case.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 08:45 AM
Hi thanks for taking the time to research this, but I'm affraid that this is not the planned behaviour I just opened a servicenow Instance and created a metric for an OOTB checkbox field on table incident and also a metric for a custom checkbox field on the same table and the results are what we are expecting, we got the current value of the field, see attached this could be something else going on our instance.
This is done by an on Insert OOTB Business rule called "metrics instance - set display value" wich basically sets the "Value" field with whatever is on the form.
I've compared both scripts and they are exactly the same, might need to reach SN HI.