Survey123 Rating field type is String, I need Integer

139
3
4 weeks ago
JayJohnsonWashoeCounty
Regular Contributor

I've designed a Survey123 form with the online design form.  I used the "Rating" widget to allow the user to rate an item from 1-5 stars.  The resulting data is formatted as STRING, even though it only contains integer values.  I'd like to display an AVERAGE rating value from this survey on a dashboard, but with the rating field formatted as STRING that isn't possible.  Can I somehow re-cast this field as an integer (maybe in a view?) so that Dashboard can get an average from it?

Jay
Washoe County GIS
0 Kudos
3 Replies
DougBrowning
MVP Frequent Contributor

First try setting the bind esri type column to integer and see if that works.

If not create a second field that is integer with a calc of int(ratingfield).  Then set bind esri to null on the rating field and it will not go to the service so no one will know the difference.

Hope that helps.

0 Kudos
JayJohnsonWashoeCounty
Regular Contributor

Doug,

I was trying to stick with the web version of the survey designer, which doesn't give you that level of control.  The Rating question type in particular looks great when created with the web version, but you are stuck with the field format of String.  If you try to later edit that with Connect in order to change the field format to an Integer, the display of the question becomes less pleasing.

"Rating" question from web designer:

JayJohnsonWashoeCounty_1-1632498546308.png

Appearance of same question after editing esribindtype to integer with Connect:

JayJohnsonWashoeCounty_0-1632498319215.png

Connect doesn't seem to handle the "Rating" question type in quite the same way as the online designer...

So, under time pressure, I've just accepted that this is the way these questions have to look in order to get them to have an integer field type.  

Jay
Washoe County GIS
0 Kudos
DougBrowning
MVP Frequent Contributor

If you can make hidden fields in the web builder then you can just use a second field with a calc of int(ratingfield).  You could also use the new data expressions in Ops Dashboard to convert it then.

Hope that helps

0 Kudos