Display radio button values as numbers


I’m trying to reflect the average response to a question.

I’m using a radio button input. Users have 4 options to choose from:

Option 1
Option 2
Option 3
Option 4.

I can capture the value “Option 1” etc in a text field in the database but I cannot reflect the average response.

I’m trying to search for all responses and show the average response.

Any help appreciated, thanks!

I’m not clear on what you mean by “average response”. Do you mean the most frequent response - i.e. the one chosen most often? Or do you want a true “mean” as computed using the numeric identifier of each option (1, 2, 3, or 4) and the number of times it was chosen? IOW, if option 4 was chosen 3 times (12) and option 3 was chosen 2 times (6), then the “average response” would be 3.6 (18 / 5). Is that what you’re after? You might have to elaborate.

Hi Shot, thanks for getting back to me. The second option. I was trying to do exactly what you have outlined in terms of a numeric identifier for each option (1, 2, 3, 4). Thanks

To elaborate further, the 4 options are:

We’ve never really done this. It can’t be hard. We’ll sort this out in no time.
We know what we’ve got to do, but we don’t know what to do next.
We know what we’ve got to do and we can see the plan ahead to get it done.
We’re really good at this, it’s kind of like second nature to us.

Each option reflects a mindset that relates to a competency framework such as conscious competence, unconscious competence. If the average response is “… its kind of like second nature to us.” I want to reflect “Conscious Competence”.

I could use the most commonly chosen response but if 4 people answer the question I could end up with a tie so i wanted to use a numeric value and then conditions that say if >3 and <4 text is …

Does that help?

Hi @sudsy The second option is what ui was trying to achieve. How would i go about this? Thanks!

Assuming you’ve created a data type called Responses (or some such), couldn’t you just add a Response ID field to that type? That would give you the numeric value you need, no?

Hi @sudsy, thanks for the response. What do you mean by response ID. I do not have dev experience and new to bubble. This is what i have set up:
Screen Shot 2020-09-01 at 8.44.37 am

You need to store a number with the selected response, so you’ll have to create one somehow somewhere. I was suggesting you create a Thing of type Response having at least two fields - the Response Text and the Response ID; but I’m not familiar enough with the structure of your app and data to know if that’s the best way to go about it.

You might benefit from reading the relevant portion of the manual and working through a few tutorials if you haven’t already. Generally speaking, your data structure should reflect actual “objects”, be they conceptual or physical in nature. If a response has a numeric “weight” associated with it, then you need to figure out how best to structure your data to reflect that.

Wish I could be of more help. Maybe someone else has some suggestions.

Hi @sudsy, thanks for taking the time, I’ll have a read and see if i can work it out!

@stuart.leo Did you find a way?
I have the exact same need.
I need to store ratings --> Showing textual lines, but they represent a numerical value. I want to store both the numerical value and the text choice.

Hi Naos,

I did although not sure if its the best way to achieve the outcome.

I created 2 option sets, 1 that holds the text options, and 1 that holds the numbers the text relates to.

Then i created a data thing with 3 fields.

The radio values are displayed on screen using dynamic choices.

I record the value chosen by the end user using a workflow in a field that is a “radio value” type.

I use the corresponding radio value numbers to get the average response with logic that converts the radio value ID into a number and display the result using a text search.
Screen Shot 2020-10-20 at 3.44.08 pm

Hope this all helps.

I soooo appreciate the answer! thank you. @stuart.leo
I’m going to give this a go!

I did also find a plugin that lets you put the numerical elements on the values, then it changes the numerical values for strings (only visually), “Radio Buttons Alternative List” but it’s a bit glitchy.

This topic was automatically closed after 70 days. New replies are no longer allowed.