Using owner Id to store data in account

But how would I do that without using local storgage data, or is that the way to do it?

To keep things simple for now, you could initialize a property (any property - you get to pick a name for it) in Page Data when the page is being loaded. Set the initial value to 1.

When the button is clicked, get the value from Page Data, increment it and save in the database.

Once that is working, change the logic in the On Page Load event to read the current value from the database and initialize the property in Page Data with the value from the database.

I don’t understand this part

Have you done any training on codeless or UI builder?

Yes, a little

You have logic that saves the current number in the database.

When the user revisits the page, you want to get the number they left off from the previous visit to the page.

To do that, you need to retrieve the number saved in the database when the user opens the page

That is done by making a query to the database and getting the number from the user’s record.

Once you have that number, you initialize a page data properly with it .

Ok Yes, I knew that. The problem is that I have tried to do that before and couldn’t find the block to that.

A block to do what specifically?

This

The following tutorials should help:

Ok heres what I’ve got:


This is in the buttons code

And this is On page Enter:
image

The problem is, when I run it, it gives me the output “Null”

Did you login?
Can you enable “reload” checkbox and retry?
What object you are updating? Did you debug(print values) or check in database if needed user were updated?

You’re making good progress, but there are a few problems with the logic you shared:

The following logic will save an incremented value, however the value in Page Data will remain the same - you need to add additional logic to increment the value stored in Page Data

In the following logic you will fetch 10 records from the Users table and store them all in the Points property in Page Data. This is not what you want… You need to retrieve a specific record from Users - the record that corresponds to the currently logged in user. Keep in mind that the Load Table objects block always returns a collection of objects (even if it is a collection of one). So you need to fetch one specific record/object add logic to extract that object from the collection. Then you need to get the Points property from that specific object:

Hmm…
I thought I fixed it it but it just wont even show a message now…


Please let me know my mistakes,

Tyler

I do not see any changes here:

Regarding the logic above, I described what should be done here:

This does not make sense:

The following comment was not addressed in your logic:

So does that mean I can’t use the Load table object block?

Also I don’t get what block I should use for this

No, you need to use that block, but you need to enhance the logic so it also does the following:

  1. Uses a where clause to load a record for the current user
  2. Extract the first object from the value returned by Load Table object
  3. Extract the Points value from the object returned by #2 in this list.

Regarding the following, I believe this should help: https://youtu.be/3mN4BTHt2WQ?si=Xswx6JkHbJ0-zMU5

Hi Mark,

I hope you’re doing well!

I wanted to reach out as part of the Pocket Perks development team regarding the page size settings for retrieving items from the “Users” table. It seems that when I set the page size to 10, it returns only 11 items, and I’d like to retrieve all entries. Here is the block:

Your help has been greatly appreciated, and I’m confident we’re on to something.

Best regards,
Tom
Pocket Perks Development Team

Hi Tom,

When you set it to 10, it should return up to 10. The maximum value supported in the Cloud version is 100; you can use paging to retrieve more. Here’s a doc on paging:

https://backendless.com/docs/js/data_data_paging.html

Regards,
Mark

@Tomdabom , also, please create a new topic for every new question. It will help keep the conversations on topic, and others can benefit from finding answers faster.

Thank you!