Juan Guillermo Garcia
Posts: 0
Joined: Sat Jul 11, 2015 10:18 pm

A variable within a ToDo list

Hello,

I ́m trying to make a to do list with score, I can manually add points to the score and add new task with their own description and reward points but I dont know how to make the code for the task's button ( if I use the same code It will add the points of the first task to the final score)

Image

Image

Code:
var val = Number(Apperyio("TaskPoints").text());
var act= Number(Apperyio('Score').text());
var valor = act + val ;
Apperyio('Score').text(valor);

Thanks!

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

A variable within a ToDo list

Hello Juan,

I'm sorry but it's not clear.
Could you please be more specific? What ToDo list are you planning to build?

Check this tutorial, is it helpful https://devcenter.appery.io/tutorials... ?

Juan Guillermo Garcia
Posts: 0
Joined: Sat Jul 11, 2015 10:18 pm

A variable within a ToDo list

Thanks!

I use that tutorial but using a Collapsible set, I want to know if there is a way to make the green arrow of each task to add the corresponding points. ( First pic I post, 500 points if completed, second task 10 points)

The program Collapsible set looks like this :

Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

A variable within a ToDo list

Hello Juan,

Please try to debug your app, this should help: http://devcenter.appery.io/documentat...
You may add alerts to check that the content of mobilecollapsblockcontent that you choose is written in the variable

Juan Guillermo Garcia
Posts: 0
Joined: Sat Jul 11, 2015 10:18 pm

A variable within a ToDo list

You can play with the app:
TeamScore

The only thing I can see debugging is that every task have counter from _0 to _x, but also I make a label that is inside the task with the id something like "55a30642e4b0f840f33a0a2c", that's how the "Deleting tasks" part works, but I don't know how to make the JavaScript to read that id or the html _x, something like, when I click on AddPoints_0 then read TaskPoints_0 and add them to the global score.

Or maybe is using a service that reads the id and can do the same job that I try using javascript.

Thanks for the help

Juan Guillermo Garcia
Posts: 0
Joined: Sat Jul 11, 2015 10:18 pm

A variable within a ToDo list

Hello Alena,

I'm sorry but i don't know what part you don't understand.
Could you please be more specific?

The only thing I need it's to save a value that is inside of the ToDo list, something like:

Last task done: homework

  • Do the groceries

  • Laundry

    (If I click the Done button on Laundry then the new "Last task done" should be Laundry)
    ex:
    Last task done: Laundry

    • Do the groceries

    or If I click the "do the groceries":

    Last task done: Do the groceries

  • Laundry

    I want to do something like that but with the "task points" so I can use that "last task done" to sum the task points to the score.

    Thanks

Return to “Issues”