Get / Profile Tutorial

Appogram loads data with ‘Get’, also there are some components with an internal fetch data feature. There is a specific ‘Get’ that we call it ‘Profile’. ‘Profile’ loads data at opening the Appo and is available in all pages, but ‘Get’ loads data in each page and is the data is available in that page.

Define fake data for test

1- Navigate to Services menu

2- Create a new service, you can select Get template.

3- Define fields and create fake data.

Define JSON fields

Fake data input parameters
Fake data results parameters

Profile:

1- Click ‘Profile’ button at top of Designer section of Studio.

2- Paste your web service URL, This is a simple object JSON format web service and you can create a Fake web service with ‘Get’ template.

3- Insert all of web service fields that you want to use. ID is the name in your ‘Profile’ operation and Field is the name in your web service JSON, it is recommended to use same names for both of them. Keep the default value empty. If you have created the fake service in Services tab, you can use Auto Fill button to load all fields automatically.

4- Use Profile data with this Syntx: @{profile.ID} which ID is the ID of field. You can copy this code from variable generator

Get:

‘Get’ is exactly same as Profile bt you can use it only in one page and you can use as many as you need in one page. The ‘Get’ Syntax is @{get.GETNAME.ID} which GETNAME is the name of ‘Get’ and ID is the data field. All variables are available from ‘Variable Generator’ below the Designer.

There is a rule: If you design your service in Services tab you can use Auto Fill or Fill with Defaults button in all data connected controls. So it is recommended to do it this way.

Fill With Defaults in a chart control
Auto Fill in a Get

Use Web Services Data

You can use web services results via variables from Variable Generator at the bottom of designer. Variables are supported at most of properties fields with @{} syntax.

Security

If your user is calling a service after logging in, the HTTP request will have the JSON Web Token and you can validate it before responding to service calls, if the user is invalid you can return a HTTP 403 error message.