After you’ve linked your app via connectors, let’s see how you can Post data to a database.
- In Miracle Studio’s Designer, click on an object you wish to post data out of
- On the right-hand side properties portion, click on the Mappings tab
- Click on the + Add button
- You would be seeing a box with fields
- Select appropriate Connector, Entity, Field and Service
- Click Save
Let’s further understand the concept of posting data via an example:
For this example we shall be using an MsSQL Connector.
Before you post any data, let’s make sure that the link i.e. connection used is properly set up. To check that; open the Connections sub-menu, click on the Entities tab and make sure the entities you wish to use with your connection are dragged in the top portion.
If your database is properly set up, everything would flow smoothly.
Check or uncheck your required options and select the Get Service and Submit Service.
Now, head over to the page in designer view.
A thing to keep in mind here is that when we post some data, we are taking data from certain places and then after an action triggers it, that data is then posted to a database.
In this example, the user enters name, age and details into 3 separate fields and then presses a button which posts the data in the fields in our database.
Now we add Mappings in these 3 fields, respectively:
Now, to complete the posting, we need to add action/trigger to our button. In the Actions/Triggers tab, click on the +Action button and add a Button Click action. In the button click action, we add a subtrigger.
Now click Save.