Combining and multiplying data from different data variables and dropdown fields

I am making an app that can be used to collect points and using the collected points. I have 3 different data resources (properties):

  • users (name)
  • rules (name, quantity, rate)
  • bank (who, what, count, points)

First we add users and then we make rules. Rules consists name of the task, quantity how it is measured (hours / repetition) and how many points one gets doing the task. For example:
Running, 1 (hour), 200 (points) or
Pushups, 1 (repetition), 5 (points).
(name, quantity, rate)

I have a page where you add the points to user when he has done a task. I have two dropdowns where you choose who has done and what task, and input field how many times or how long. Thanks to you the dropdowns are working correctly.

So if Jack has done running for two hours he should get 400 points. The app needs to check the dropdown fields Who and What and check how what is the rate of that task from rules. Multiply it using the number of the input field and save to bank all that info:
Jack, Running, 2, 400
Jill, pushups, 100, 500
(who, what, count, points)

How do I make it count the points using the dropdown fields and rules-resource and save all that data to bank? All that data consists: who, what, count, points and preferably later on the date.

After that we want to see the points one has collected so I want to sum the points from players and show it on main page
Jack 1600
Jill 1850

I am thinking to save the points to “users” data resourse. Is that a good choise? If so, how do I do it?

Hi there!

There’s quite a few ways you could setup the logic for something like this.
The way I would begin to set this up, would be like this:

  1. Use the logic canvas events to listen for the dropdown values to change
  2. Using Formula functions, calculate the score and set it to a page variable, for example “new_score”
  3. again with logic canvas events listen to changes on “new_score” and using “Create record” -flow function to interact with the data resource

Associating the points with the user in the data resource sounds like a good plan too!

I hope this helps you forward a little bit!

Thanks @Akseli_Virtanen. I am using low code/no-code system because I have low-code brains and knowledge :smiley: I am learning but I need quite a lot of guidance when making more complex solutions.

I am sorry I didn’t realise to give you all the info. I have a logic that saves the data “who”, “what” and “How much” to bank. Those are saved straight to data variable. Does it matter? It would be a sound solutions to add input field to same page with dropdowns where user can see how many points he is getting from the task. From there it could be saved to bank.

I have hard times to create the Formula to fetch data. Formula needs to check the “what” dropdown, fetch rules.rate based on and multiply it with “how much”. Right? Could you help me to understand how to create the formula?