1. Thomas Rolseth
  2. SnapObjects
  3. Monday, 16 September 2019 18:30 PM UTC

I'm using the datastore model of SnapDevelop in a web api to populate an external datawindow in the client using the ShareData() method.  How would I -- with one restclient call -- populate this multi-row grid datawindow AND also import a single row of data into another 'master' datawindow.  I could do this with two calls using the Retrieve method of the restclient object but I'd like to avoid that if possible.  In other words, is it possible to return a datastore and a json string as part of the response or perhaps by reference?  Possible?

Thanks, Tom

Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 17 September 2019 02:48 AM UTC
  2. SnapObjects
  3. # 1

Hi Tom,

In a Web API project, you can use an IDataPacker object to package multiple types of data elements together and return it in the controller.

For example: Use IDataPacker.AddDataStore() to package the data from a DataStore


Then use the JsonPackage object in the PB client to receive the JSON data (Response Body) and call JsonPackage.GetValueToDataWindow() or JsonPackage.GetJsonString() to import the data into DataWindows.



There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.