Creating a star survey in servicenow

Ajai S Nair
Giga Guru

Hi All,

I have a requirement to create a survey using stars in ServiceNow. Normally we will be having a radio button and on clicking that the value will be stored in the table

But now what I want to create is something like star ratings. When a user clicks 5 star , the corresponding value should be stored in the table and similarly for 1,2,3 and 4 stars. Have anyone tried and succeded in developing something like this. Then please share the code with me.

3 REPLIES 3

TrevorK
Kilo Sage

Are you planning to use the Survey/Assessment modules within ServiceNow or are you looking for something completely outside of this?



If you are looking for something completely outside of those modules, then you would just create a simple UI page. The downside is you lose the advantage of using the surveys/assessments and their built-in functionality that SN has delivered.   In our case, we have done both types of survey's and they each have their pro's / con's.




I think this is the decision you need to make before you can go any further.


Hi Trevor,



Thanks for the reply.



Is it possible to perform this star survey using the out of the box survey/assessment module?


I am not very good in jelly script.


If you have already done this,Could you please share me the code to create it using UI page ?


I do not recall seeing the ability, out of the box, to do the survey in the way you are asking. However, if you are using the legacy Survey piece you can create UI macros to do it. Brad Tilton (b-rad ) has developed something on Share that I think uses this method: ServiceNow Share so I would definitely look up his solution for ideas/inspiration.



I am unsure if the newer Assessment piece allows for UI Macros though, and I think Brad's solution relies on the UI Macros. If the functionality does not exist in the new Assessment module you could most likely do something with UI scripting to intercept on load and provide your images for the scale. This would require Javascript/HTML programming knowledge though.