Skip to Content Skip to Menu

[SOLVED] auto scores registration

  • Pas-1or2
  • Pas-1or2
  • OFFLINE
  • Posts: 35
  • Thanks: 0
  • Karma: 0
9 years 10 months ago - 9 years 10 months ago #256000 by Pas-1or2
[SOLVED] auto scores registration was created by Pas-1or2
Is is possible to auto calculate 2 score fields?

I've got these fields:
score 1 = Integer Number
score 2 = Integer Number
totalscore = Integer Number

I want to calculate totalscore (score1+score2)

How should this be done?

Regards,

Pascal
Last edit: 9 years 10 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 10 months ago - 9 years 10 months ago #256022 by nant
Replied by nant on topic auto scores registration

Pas-1or2 wrote: Is is possible to auto calculate 2 score fields?

I've got these fields:
score 1 = Integer Number
score 2 = Integer Number
totalscore = Integer Number

I want to calculate totalscore (score1+score2)

How should this be done?

Regards,

Pascal


You need to create a Query Auto Action that triggers on profile updates (conditional on value changes of your score1 and score2 fields) that updates the total score field using a database query.

As this is a cool topic for a CB Auto Actions video tutorial I will be doing one in the next days.

www.youtube.com/playlist?list=PLp0puRITgC7McQcw0Sli1qfSUQGwmflzi
Last edit: 9 years 10 months ago by nant.

Please Log in or Create an account to join the conversation.

  • Pas-1or2
  • Pas-1or2
  • OFFLINE
  • Posts: 35
  • Thanks: 0
  • Karma: 0
9 years 10 months ago #256044 by Pas-1or2
Replied by Pas-1or2 on topic auto scores registration
Hi Nick,

Wow lots of possibilities wtih this actions.
But where do I start on this:

- add action, triggers after backend profile update
- what should be the condition or action to use?? scoretotal=score1+score2?
- and what should be set in the field itself (Integer Number)?

Hope you can point me in the right direction.

Regards,

Pascal

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 10 months ago #256137 by nant

Please Log in or Create an account to join the conversation.

  • Pas-1or2
  • Pas-1or2
  • OFFLINE
  • Posts: 35
  • Thanks: 0
  • Karma: 0
9 years 10 months ago #256142 by Pas-1or2
Replied by Pas-1or2 on topic auto scores registration
Thanks Nick,

Very well explained and exactly what I need.
Could the total score be processed real-time after adding score1 or 2 also?

Right now I have 5 games (in tabs) for users to add their scores.
Should I use unique field names or can I use the tabname to identify the score?

Thanks and regards,

Pascal

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 10 months ago #256147 by nant
Replied by nant on topic auto scores registration

Pas-1or2 wrote: Thanks Nick,

Very well explained and exactly what I need.
Could the total score be processed real-time after adding score1 or 2 also?


What do you mean by "total score"?
It already processes each user's total score based on the sum of the 2 score fields.

Right now I have 5 games (in tabs) for users to add their scores.
Should I use unique field names or can I use the tabname to identify the score?


You would need to use the concept explained and extend it to add up scores for each game.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum