it states that we should save the next set of data of a user under a new table. ‘data/person’.
I haven’t tried doing that, but may I understand what’s the logic behind it?
If data from the same user are saved in different DBs, what are they linked by? How do we know it’s from the same user? (for eg, how do we know username: Goku is from tommyhilfiger@gmail.com if they are stored in different APIs?)
These are two independent examples.
You can store all data in the Users table. They can even be passed directly at registration time using the setProperty( string key, object value ) function. If you want to store data separately from the Users table, then you can establish a relation between the two tables, or simply use the same objectId.
The first page (which is the registration page with inputs of email and password) is smooth.
For the second page (which only has inputs of username and date picker for birthday), ‘Record properties’ tab of the ‘Create Record’ Component needs me to insert the email and password as page variables, otherwise they will be static text. So I created email and password as page variables on the second page.
I know there must be something that I’ve forgotten to link or done in error, because the email and password inputs aren’t in the second page, bringing them in as page variables might be the cause of this error.
Even if I leave the email and password empty as static text, the error is the same.
How do I inform the system that the input of username and birthdate on the second page is a continuation of what the user does after the registration? So that it can stop asking for the property value input of password.
@Troy_Lee, this error indicates that the server does not receive a value for the “password” field. You need to make sure you are sending this value. Alternatively, you can split this logic into 2 queries. The first one uses /user/register and the server will return the objectId to you. Then using date/Users passing your objectId value to Request body, you can save additional fields.
Thank you for your reply, and sorry for the multiple messages.
The value for password is passed on for the first page using users/register. But it’s just not passed on for the second page.
So yes, I’m thinking of the alternative you recommended. But my mental map for that is dark, blank… LOL. Which documentation in specific or is there a particular mission tutorial that I can take to learn about this? It’ll be 2 database but linked with the same objectId, is this understanding right? @Nikita_Fedorishchev
@Troy_Lee, all these things are described in our documentation. Will this be stored in one database? Depending on your preference and how you want to do it. The example I described saves everything to the Users table.
I would very much prefer one database. Like what you said, under Users.
I’ve read this page many times today
But over at appgyver, I don’t see the request response body (I see it in backendless REST API)
My current logic flow @ appgyver is :
Create input field, link it to page variable: username
Create Date Picker, link it to page variable: birthday
Create button below to ‘create record’, link it to the database and set page variables of username and birthday.
Dismiss initial view
Open new page.
I’m guessing the error might be at the create record part. Judging by the ability to get all the inputs when i RUN TEST @ Data Configurator.
But i just am not sure what and how needs to be changed.
It would be much easier for us to operate at the level of API calls made from your app rather than pages. When you make a user registration API call, both email address and password are required. In addition to these two properties, you can add additional ones as shown here.
Since you’re talking about “first page” and “second page”, does your app make several registration calls?
I’m not too sure about the qtn. The first page is the registration page. With the ‘Create Record’ Logic flow calling into the data resource that has the user/register ending linked to Backendless.
The second page and subsequent pages will be about filling information of this user.
But within the ‘Create Record’ Logic flow, the data resource funnelled to is still the same as the first page’s, with the URL ending with user/register.
Is this method of proceeding wrong?
In regards to the link you shared, when I’m running a test over at the data config side, everything is added nicely to the Backendless backend, in the users table.
My issue is when I input the entries within the app. Only the inputs from the first page (email and password entries) are reflected in the backend. And not inputs from the second page.
So I was wondering: Is there a need to bring over the entries from the first page (email and password) to the second page to tell it that we are in fact updating columns for the same user?
If so, how do I go about doing it? (Should the email and password then not be page variables but app variables instead?)
When the system error shows code 3041: unable to register user. Missing required property value for ‘password’, it’s in fact able to register the inputs on the first page as shown in the screenshot below:
I think I understand it a little better now. The registration page (the first one) uses the User Registration API call. On the subsequent pages, you need to update the user record to add additional data to the user record.
The result of the user registration call (the first one) is a JSON object that includes the objectId property of the user record. It will be important to include that value in the subsequent call to update the user record.
For subsequent update calls, let’s say it’s ‘username’ and ‘birthdate’ on the second page, it would be ‘Saving Multiple Objects’ instead of ‘Saving Single Object’?
I see, ahhhh, thanks for the clarification Mark. Single object update meaning updating a row (user). Multiple objects update means updating several rows, up to 100.