I am trying to mapping the results of a search from an api to my database. The results will return multiple items so I have to use the “” option to receive all of the required items. The returns work ok but when I try to save the items to the database, only one row is added to the database and the database fields are empty. How do I make this work?
[quote:]The returns work ok but when I try to save the items to the database, only one row is added to the database and the database fields are empty.[/quote]
How exactly do you save it?
What service do you use for this? Show us its settings and parameters.
I have made some progress on this by following Max Katz’s Lesson 6 latest video. However I am only able to upload the first product I receive on the results
The rest service I connect to is
This is my configuration
Create a Model (pic1)
Create a storage variable (pic2)
Create a get service (pic3)
Map get results into storage model (pic4)
Map storage model onto App page (pic5)
When Add button on App page is clicked add results to database (pic6)
Unfortunatly you can not edit multiple objects with singe request.
Here is two solutions you can chose from:
Use update service for each item(client part).
1.2. Iterate through all your items.
1.3. for each item you need to invoke update service.
Single request with server code.
2.1. Form needed array of items.
2.2. Pass this array of items to server code.
2.3. In server code you need iterate through all items and update all items one-by-one.
Also it's hard interface for user - to edit multiple items. Do you sure you have/need this interface in your app?
Thank you for you reply. The interface displayed above will be read only with a button to upload the item to database. So the user will not be able to select certain items. It will be "select and upload all item". Could you give me some examples of how to do this with server code?