AnsweredAssumed Answered

Data from Service

Question asked by jay.kapalczynski on Dec 20, 2019
Latest reply on Dec 20, 2019 by jay.kapalczynski

I am trying to retrieve data from a Service so I can take my application offline.  I have this working to some degree but confused on a few things. 

Right now I am using the populateFromService Method to get my data and display it in the map. 

ServiceFeatureTable QML Type | ArcGIS for Developers 

This supposedly creates a local database and stores the data there?????

*  I can view the datasets in my map

*  I can select and return data from those locations

SO everything is great there......


Problems / Issues:

If I leave the page and then come back to it the data is gone.  This requires me to sync back up with the data.  

The problem is that if I am off grid I cannot do this.  



Where is this geodatabase being created?

Is it being deleted once I leave the page?

Is there a way to store it somewhere else?

Can I update the data in this database by re-syncing at another time?

Are there other options for reading and syncing the data from a service into 3 different feature classes/Tables?



I would like this to be a permanent geodatabase on the users phone that gets updated via a button.  

Is there a different import/sync procedure that is more permanent?


Currently I am doing this:

FeatureLayer {
     id: featureLayerBoating

     ServiceFeatureTable {
          id: featureTable0
          url: ""

     featureRequestMode: Enums.FeatureRequestModeManualCache

     onPopulateFromServiceStatusChanged: {
         if (populateFromServiceStatus === Enums.TaskStatusCompleted) {
             if (!populateFromServiceResult.iterator.hasNext) {
             var count = populateFromServiceResult.iterator.features.length;
             console.log("Retrieved %1 features".arg(count));

QueryParameters {
    id: params
    whereClause: "1 = 1"


    if (checked == true){
        featureTable0.populateFromService(params, true, ["*"]);
    }else if (checked == false){