Build your form the way you want and fill in your profile. Click on the Submit button to add your profile to the API.

When you go to the Developer tab → Custom Objects → Customers, you will see the profile we’ve just created.

Step 5: Showing the user profile in your app

Add another web service block and select the AppMachine as the provider

This time select “GET - Returns data from data store”

Insert the name of the datastore we just created. In this case our data store is called “customers”

Click Next and you will see the data that is inside the data store

Check the box for “root” , after that name your block “My Profile” and click Finish. You can make the screen again as you want with an Edit button so the user can edit their profile if they want. This will be explained in the next tutorial.

At first you will get ALL the items in that data store, but we don’t want that. We want only the items for the logged in user to show, so how do we do that?

Go to your My Profile block

Click on the dataprovider dots and go to “Query” tab

Add to the “where” the following: email == '{user:email}'.

*Note this is case-sensative ( both field and value ). If {user:email} has the value 'johnny@appmachine.com' but in the DataStore it's stored as 'Johnny@apmachine.com', the filter will not return anything.

This will only get the items from the data store from our logged in user.

If everything went okay you will only have the data of the currently logged in user

Summary

We’ve build a profile form

(POST) Added a profile to our data store “customers” with the AppMachine API

(GET) Got all the data back from the data store “customers”

Filtered all the data with the “where” condition to only get the data from the currently logged in user.

Created a profile screen to show the currently logged in user their profile