Survey Column Values

jamie_bowers
Tera Contributor

Hello everyone,

 

I have been working on the ability to report on our survey results in a more reader friendly format. I have created a database view to show all of the survey results in a single row and I have customized the column headers to reflect the questions instead of just "value" or "string value". However, I cannot figure out how to get the display names of the answers to show instead of the numerical value. 

 

Example: In the screenshot below, the column labeled "Follow Up Contact Requested" displays a value of 0 or 1. In reality the answer to the question is Yes/No. 

 

jamie_bowers_0-1707157261903.png

 

Any idea what element I would map this to for it to pull the Yes or No value instead of 0 or 1.

 

jamie_bowers_1-1707157602641.png

 

Thanks for any input!

1 ACCEPTED SOLUTION

aj2171
Mega Guru

Hi @jamie_bowers,


Here are instructions I've used in the past to achieve a similar result. I hope this works for you!

 

  1. Identify the name of the table containing the survey results and the corresponding table containing the survey questions and answers.
  2. In the survey questions table, identify the field where the answers' display names are stored.
  3. In the survey results table, find the field displaying numerical values (0 or 1) instead of the display names.
  4. Navigate to the "System Definition" > "Database Views" > "All" menu.
  5. Locate and open the database view corresponding to the table of survey results you wish to edit.
  6. Navigate to the field that needs to display the display names (the field from step 3), then under the "Map field" column insert this syntax: survey_questions_table.field_with_display_names.
  7. Replace survey_questions_table with the name of the table containing the survey questions, and replace field_with_display_names with the specific field name that holds the display names.
  8. Save the changes and verify that the display names are now being shown in the corresponding field of the survey results table.

View solution in original post

8 REPLIES 8

AshishKM
Kilo Patron
Kilo Patron

Hi @jamie_bowers , 

If you notice others columns also showing 1 or 0, instead for yes/no or true/false.

Share the DB view configuration details. Which other table you mapped in DB view along with "asmt_assessment_instance".

 

-Thanks,
AshishKM

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Hi @AshishKM,

 

Is this what you looking for? The other table I'm mapped to is 'asmt_assessment_instance_question'.

jamie_bowers_0-1707161416915.pngjamie_bowers_1-1707161423949.png

 

 

Thanks for sharing, checked both the table data for completed survey and found that survey response value are saved in numeric only however the Survey Questions are String or Yes/No type. Due to this numeric value, we are calculating the average CSAT score.

 

Check the data type :-

https://docs.servicenow.com/bundle/vancouver-servicenow-platform/page/administer/assessments/referen... 

 

For any Survey Question Definition Page, you can check the Data Type select box which is holding the String type and this "Yes/No" , actually its configured in Choice [ sys_choice ] table.

 

AshishKMishra_0-1707195936157.png

 

Open any Survey Question Definition Page

AshishKMishra_1-1707195985903.png

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Hi @jamie_bowers , hope you got my reply on 0/1 values.

-Thanks

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution