database view showing duplicate records

will_smith
Mega Guru

I have setup a database view to join the Incident table, the Assessment metric results [asmt_metric_result] table, and Assessment instances [asmt_assessment_instance]. The problem that I am running into is that all of my results are coming back with the same number, even though the assessment values are different. This tells me the records Please see the below screenshot, and thanks for the assistance!

Here is my database view...

find_real_file.png

Results with duplicating numbers

find_real_file.png

10 REPLIES 10

Matt Dodd
ServiceNow Employee
ServiceNow Employee

Hi William,



I took another deeper look at this, but it was a little difficult without having some of the data behind what you've created (the assessment itself). I did create something similar though, and think i got it working. To do this i modified the join slightly, so as to join to the incident table via the asmt_assessment_instance_question table instead of asmt_assessment_instance. I also joined using the source_id = inc.sys_id



I've attached a screenshot of the configuration i used and the results obtained too.



Configuration:


db_view_config.jpg


Results:


db_view_results.JPG


Im guessing some of this may vary depending on the configuration that you did when creating the assessments though. And if so, this may not even work for you either. Assessments isnt not one of my strongest areas of the platform and took a little bit of fiddling around to set one up, but i think i learned a few things as a result anyway 🙂



Hope this helps..


Matt Dodd
ServiceNow Australia (Perth)
Senior Advisory Solution Consultant

Glad we could learn something together! I set up my view to mirror yours and I'm now getting no records to display. I will keep fiddling with it, but let me know if you've got any other suggestions.



Thanks for your time.


Is there any possibility of sharing how your assessment is defined? I'm trying to replicate but I don't have any assessments currently defined on Incident so it's tough.


Hi Guy, the OP has a screenshot of the assessment. Is this what you're looking for?


Matt Dodd
ServiceNow Employee
ServiceNow Employee

Hi William - I think we'd need the actual configuration used to build it, so its possible to replicate exactly what you have there - there are a number of different ways they can be configured which may impact any testing & possible solution.


Matt Dodd
ServiceNow Australia (Perth)
Senior Advisory Solution Consultant