How to increment a value in a infotable for creation of a geofence on map?
- February 12, 2020
- 1 reply
- 2420 views
Hello ,
I created a geofence using an infotable inside an infotable,i.e (outer infotable as columns id and location ,column location contains one more infotable along with columns again id and location region.).The location region column is with location base type and id has a GUID as base type.I need to increment a id value in outer infotable. So that I can close the geo fence set. Service as follows :
region = me.map_regionCopy;
if(!region) {
params = {
infoTableName : "InfoTable",
dataShapeName : "Region"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(Region)
region = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
}
//var result = region;
var params = {
infoTableName : "InfoTable",
dataShapeName : "shape_for_geo1"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(shape_for_geo1)
var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
var newEntry = new Object();
//var i,n = 1;
for ( var i=1 in result.rows){
newEntry.LocationRegion = region; // INFOTABLE
newEntry.ID = i; // NUMBER [Primary Key]
// break;
i++
}
result.AddRow(newEntry);
But this is giving output as null infotable with column names where I can't see the data in infotable.
Thanks,
Bhargav.


