Select to view content in your preferred language

Taking Non Spatial Table Offline

686
2
Jump to solution
03-06-2019 02:11 PM
MKa
by
Frequent Contributor

I need to query a non spatial table offline that is in my mobile map package.  Here is what I do online and it works

THIS is what I do online and want to do the same offline.  I basically do the below to find my query layers and tables to use later on

for (var i = 0; i < map.operationalLayers.count; i++) {
    //DO SOMETHING ONLINE
}

for (var y = 0; y < map.tables.count; y++)
{
    //DO SOMETHING WITH THE TABLE ONLINE
}

Here is the Offline code after I just went offline and everything downloaded to my device with the mobile map package.  No tables are returned when one should be returned as it does when online.

//This works for the operational layers and 2 are returned as expected
var operationalLayers = offlineMapJob.result.mobileMapPackage.maps[0].operationalLayers
for (var i = 0; i < operationalLayers.count; i++) {
    //DO SOMETHING OFFLINE
}

//No tables are returned?? It should be one
var tableLayers = offlineMapJob.result.mobileMapPackage.maps[0].tables
console.log("TakeOfflinePage - tableLayers.count :", tableLayers.count );
for (var y = 0; y < tableLayers.count; y++)
{
    //DO SOMETHING WITH THE TABLE OFFLINE, Non return however
}‍‍‍‍‍‍‍‍‍‍‍‍‍

I feel this might have something to do with my generate offline map parameters, but I have tried all variations including 

parameters.DestinationTableRowFilter = Enums.DestinationTableRowFilterAll

I just need to know how to make the tables download along with the operational layers

0 Kudos
1 Solution

Accepted Solutions
LukeSmallwood
Esri Contributor

Hi there, I just have a couple of questions about the data you are using here:

Are these non spatial tables part of a relationship? Are they i the same feature service as the operational feature layers you are successfully taking offline.

To confirm that there were no errors as part of taking these tables offline, you can check the property GenerateOfflineMapResult::tableErrors() returned by the job.

View solution in original post

2 Replies
LukeSmallwood
Esri Contributor

Hi there, I just have a couple of questions about the data you are using here:

Are these non spatial tables part of a relationship? Are they i the same feature service as the operational feature layers you are successfully taking offline.

To confirm that there were no errors as part of taking these tables offline, you can check the property GenerateOfflineMapResult::tableErrors() returned by the job.

MKa
by
Frequent Contributor

You are correct.  I needed to setup the relationship between the feature layer  and the non spatial table, that way when it went offline it grabbed the non spatial relationship by default.  This was my problem.  Thank You

0 Kudos