Adding a Data Set
Adding a Data set
Creating a new data set in Design mode
- From the landing page of the Digital App Builder, open any existing App or create one in Design mode.
Click Data on the left hand panel.
Click Add new data set. This displays the Add a data set window.
- Create a data set. You can either create from an existing source (default) or create a data source for a microservice using an OpenAPI doc.
- Create from existing data source (default) - This will populate the dropdown with all the Data sources (adapters) from the configured Mobile Foundation server instance.
- Create Data source for a microservice using OpenAPI doc - This option lets you create a Data Source from an Open API specification document (Swagger json/yml) file, and a Data Set from it.
Create a Data set from an existing Data Source
- Select the Datasource for which you want to create the Dataset.
- This will populate the available entities in the Data Source. Select the entity to be created.
Give a name to the dataset and click the Add button. This will add the dataset and you will be able to see the Attributes and Actions associated with that dataset.
- You can Hide some of the attributes and Actions based on what you want to do with the data set.
- You can also edit the Display Labels for the attributes
- You can also Test any of the GET Actions by providing the required attributes and clicking on the Run this action which is part of the Action. Remember for this to work you should have specified the Confidential client name and password in the Settings tab.
Create a Data source for a Microservice using a swagger file
- Select the json/yml file for which you want to create a datasource for and click Generate.
- This will generate an Adapter, which is a configuration artifact on the MF server that you can re-use and deploy it to the Mobile Foundation server instance.
- Select the entity for which you want to define the data source for.
- Give a name to the dataset and click on Add button.
- This will add the Dataset and you will be able to see the Attributes and Actions associated with that dataset.
You can now bind this data set to any of the data bound controls.
Binding the data set in your app
- From your app in design mode, go to the page you want to add the list.
- Click the Show Controls to view DATABOUND.
- Click to expand DATABOUND and drag-and-drop the List to the canvas.
- Updates the Values as required.
- Add the List Title.
- Choose the List Type to work on.
- Add content to the list item.
- Connect to a dataset to use.
Creating a new data set in Code mode
- From the landing page of the Digital App Builder, open any existing App or create one in code mode.
- Click </> (Show Code Snippets).
- Navigate to IONIC and add the required Code Snippet (Simple List, Card List, Header Button) and modify the code as required.
Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.