How can I assign data for each user individually?

I tryied Backendless.UserService.CurrentUser().setProperty()

but an error message say (Attempt to invoke virtual method ‘void com.backendless.BackendlessUser.setProperty(java.lang.String, java.lang.Object)’ on a null object reference) when I click on save button in may application

here is the code:

public void save(View view) {
Backendless.UserService.CurrentUser().setProperty(“Favourite movies”,movienameText.getText().toString());

Backendless.UserService.CurrentUser() will be always null, until you login the user

what I mean is that I want to make a new table(class) for each user, every time a new user register in my application.

Hi, Peter.

You can add new column to Users table and set this property for each user individually.

@peter_estafanos with the approach you described (table per user), you will run into a possible scenario of huge number of tables when your userbase grows. I suggest to consider a different type of schema and data model

1 Like