Glide app that does calculations for multiple users

I am having some issues with creating an app that shows individuals an outcome based on their inputs.

Basically, users rate 14 categories from 1 to 5, these scores are then tallied and used to weight some background data in order to get an output for that user based on the scores given.

My issue is that as soon as a new user opens the app and starts rating category 1, this impacts the choices already submitted by someone say on category 10. How do I get a new instance of inputs for each user, and furthermore how would I then keep calculations seperate

Hi
Welcome to the wonderful world of Glide.

You need to use user specific columns
If you search you will find quite a few postings - we’ve all been there !

1 Like

To do so, you must create your category columns in Glide dataeditor (not in GSheet) and tick “Column is user-specific”.
image

1 Like

Thanks, how do I then link this user specific column to cells used in the sheet to do calculations? I am allowing users to give a rating from 1-5 (stars) where this is then used to doe some weighting calculations on the google workbook

Hi,

User Specific Column (USC) values are not brought back to G-Sheet.
The easiest is to do your calculations directly in the Glide dataeditor with “Maths” column

Ex.

  • (Column type Basic / Number with USC ticked) User Data
  • (Column type Basic / Number) Weight
  • (Column type Maths) Calculation => type the formula U * W, than state U = column User Data and W = Weight.
    Then it will calculate automatically

The calculations are fairly complex, is there no way for the user inputs to be brought into sheets?

Yes, but more advanced, and in addition it can have some lag (time to synchronize go & back between Glide and G-Sheet)

The principle is to copy the user specific value entered by the user in an other (non user specific) column that will be synchronised with G-Sheet.
This requires to trigger an “Action” to create the flow and therefore you’ll need a button that the user will click after selecting ones grade (1 to 5).

I don’t use G-Sheet, but the principle in action should probably be this:

In Dataeditor

  • Create a column “USC copy”

In Screen

  • Create a button
  • Create an Action on this button

  • Choose the action “Set column”
  • In the “USC Copy” field, assign the “USC User data”

Hopefully, this “USC Copy” should replicate to G-Sheet and you could base your calculations upon it.

2 Likes

thanks, using this now. Will this not create the same issue as users overriding the values of other users?

Hum… you’re probably right indeed, sorry for the wrong idea (not very at ease with working with G-Sheet & User specific).
Finally, I wonder if you should use a Form hosting your Choice Components of grades. But the big drawback, is that it would require to create 1 row per selection per user (in another tab).

I think that we need @ThinhDinh on this one…

thanks for the insights so far. Have learned a lot. Do you think we could do a google meet or something so I can explain my issue to you both and we can try and solve it?

Maybe we need to know how you’re doing the Sheet calculations in order to make the full flow work with user specific columns. I always try to keep things in Glide, unless you absolutely need it to appear in the Sheets to do some third party integrations.

I could do s screenshare with you to better explain, maybe you could help me find a way to do the calcs in glide then?

If you can record you explaining the whole process via Loom and share the Loom link here it would be great.

Thanks for the video. I think that shines much more light on your data structure.

It’s not gonna be easy to replicate all of this in Glide but I think that’s the way you must go to make this work for multiple users.

Firstly without knowing how you’re getting the ratings from the user, I say still make it a user-specific column.

Then you can calculate the percentages by: adding a rollup column to sum the whole user-specific column and then a math column to divide it then times 100 to get the percentage.

Next, after having the percentages, we then need to restructure the countries database a bit.

I imagine you should have a table with:

  • Countries
  • Raw score for each of those categories (that you can use some kind of relation and lookup to derive from your Scoring table)
  • Final score for each of those categories (math column, based on the raw score and the user input)

Then from those final score, plug that final score back to your “Scoring Sheet” and use multiple math columns to derive each category’s user-specific score and then the final “country scoring”.

Finally I believe you can use an inline list to show top 5 scores of countries.

When you use a user-specific column for the input then your output of this whole process will also be user-specific.

All in all, this is still a very hard rebuild. Hope someone else can chime in with their ideas and good luck!

2 Likes

there are 2 ways to do that… (you did not show how users are ranking it in the App so my answer might not be relevant)

  1. keep ranking entry on separate sheet with user ID, topic and rate columns and record each event separately, using action add row… then you just run query on that sheet to get your average rates.
  2. have pre-calculated average rating for each option 1-5 and you will replace main score with this value using action set columns + increment +1 numbers of votes… this would be the easiest fix
1 Like

Thanks for the help. I got stuck again and have attached another loom if you wouldn’t mind checking it out

mmm, yes… very cumbersome.

I think I’d be looking to flip (transpose) how you have that laid out. So instead of lining your countries up in columns, have them all in a single column with one country per row. If you do it that way, then you only need to define each calculation once. The way you have it at the moment, it will be a nightmare to maintain, especially if you need to come back later and add/remove countries.

Does that make sense?

2 Likes

Thanks for this. Is there a way to sum the values over rows?