Display data on your page
- Open the page "Home_Web".
- Drag a “Data view” widget from the Toolbox onto your page right below the text that says “Welcome to your new app”.
- Double-click on the data view widget to open its settings. Under "Data source", select "Microflow", then select "REST_Call" for the microflow.
- Click “OK”. Click “No” for “Do you want to automatically fill the contents of the data view”.
- Drag a text widget from the toolbox into the data view widget on the page.
- Double-click on the text widget, then click on “Edit…” next to the “Caption” option.
- Create a new parameter. Click “Select…” next to “Attribute (path)”. Select “Value” under “First_name”.
Click "Select" then "OK". This made a parameter we can use in the text box. Type "Hello {1}!" in the "Caption" text box. This will display your first name.
- Click “OK”, then “OK” to save your changes.
- We now need to fix the errors. Open Main > Security.
- Go to the “Page access” tab. Next to “Home_Web”, check “Administrator”.
- Go to the “Microflow access” tab. Next to “REST_Call”, check all 3 boxes.
Go to the “Entity access” tab. Click “New”. Select “First_name”, then “OK”. Check all three boxes under “Rule applies to the following module roles”. Under access rights, check both boxes, then select “Read, Write”, then under Member > Access rights, change the value to “Read, Write”. It should look like this.
- Click “OK”, then “OK” to close all the popups. Now, you should have no errors.
- Run the program. Make sure you are not logged in as MxAdmin. You should see your name on the page.
- Congratulations! You have made an API call using Mendix! Now let’s take this a step further.
Previous Topic
Call an API
Next Topic
Get user input