Brain Fart: Creating a "key" of values for gamification?

What I’m wanting to do is extremely simple, yet my brain for whatever reason can’t comprehend the execution.

On my User datatype I have a field called “Points”. Whenever the user does certain actions on my site the user is awarded some number of points. So for example, if they leave a comment they would get 10 points. So part of the workflow that posts the comment has an event that modifies the Users “Point” field by adding +10 to that field.

My issue is I’ve got these little awards all over my site across different things and it would be nice to update the value of an action from one place.

So rather than finding all the places where a comment workflow would happen and change the value of 10 to another number, it would be nice to have a special admin page where it’s a list of all the ways users can earn points with an input box next to each one with the current value that I can change.

So in the comment workflow instead of +10 it would be something like +(Dynamic Value of “Points for Commenting”)

My brain naturally says to make a Datatype called “Scoring” and each field is the many ways users can score and they are numbers:

DataType: Scoring

Field: Comment
Field: Get an Upvote
Field: Log In

my brain freezes because we call data from Things, not Data Types. So would that then mean I create the data type above and just have one “Thing” that I’m always referencing?

Hey @brandon8 :wave:

I understand the feeling! Hmmm :thinking:

Could you use options sets?

Name: Commenting
Points: 10

Name: Posting
Points: 20


Then choose the options set’s points? If you send it to the backend you could send the option set and whatever the points are to update in one place.

Does that make sense?

Hope that helps! :blush:


For All Your No-Code Education Needs:

1 Like

Super late in getting back to this, but yes! That’s works perfect!

1 Like

Awesome! Glad it helped. :blush:

1 Like