FeatureSet commands not working again

266
3
Jump to solution
12-22-2020 11:09 AM
DougBrowning
MVP Notable Contributor

The FeatureSet commands seem to have gone out again in the latest update to Field Maps.  Not sure when but all my test maps that were working are now broken.

I am going Production on this now and at the last hour nothing is working. 

My code works in the web map great so I do not think that is it.

DougBrowning_0-1608663868159.png

But now in Field Maps all are Null or 0

DougBrowning_1-1608663922602.png

Sample code

DesignLat {expression/expr6}
var sql = "PointID = '" + $feature.PointID + "'";
var tbl = Filter(FeatureSetByName($map,"Points", ["DesignLat"], false), sql);
var val
for (var row in tbl) {
       val = row.DesignLat
}
return val

Using an iPad Pro with the latest 

I really need this fixed since this project since I have a deadline.

Thanks for any help!

1 Solution

Accepted Solutions
DougBrowning
MVP Notable Contributor

Yes I had tried that already but no.

I heard back from the Field Maps team and they are seeing the same thing so they confirmed it as a bug and are looking into it.  They think it is something with field request messing up the SQL query.

Good news is offline my popup is super fast so I am ok for now.  Online it is taking 5-6 seconds on a iPad Pro and 13 on a regular iPad.

thanks

View solution in original post

0 Kudos
3 Replies
DougBrowning
MVP Notable Contributor
Ok I may have tracked down the issue.  It breaks when I try to give it a field list.  But it only breaks on the app.
 
This does not work
var sql = "PointID = '" + $feature.PointID + "'";
var tbl = Filter(FeatureSetByName($map,"Points", ['CollectCoreSubset1'], false), sql);
var val
for (var row in tbl) {
    val = row.CollectCoreSubset1
}
return val
 
But this does
var sql = "PointID = '" + $feature.PointID + "'";
var tbl = Filter(FeatureSetByName($map,"Points", ['*'], false), sql);
var val
for (var row in tbl) {
    val = row.CollectCoreSubset1
}
return val
 
I also tried 2 fields and making a field a objectid but no.
 
I had just changed this to make the calls faster since my popup is getting slow.
 
Does this make sense then?  I found it on accident when I tried a diff expression.  
 
I tested with geometry true and false but no diff.
 
So it looks like something with listing fields breaks the app.
 
Well at least I can change my code for now.  Let me know what you find still as the calls will get slower returning all fields.  In fact my pop is now 5.5 seconds on a iPad Pro and 13 seconds on on a regular iPad!  Web map slowing down also.
 
Hope this helps someone.
0 Kudos
Dominique_Broux
New Contributor II

Might be because the field used by where clause is not requested, could you test with ['CollectCoreSubset1', 'PointID']?

0 Kudos
DougBrowning
MVP Notable Contributor

Yes I had tried that already but no.

I heard back from the Field Maps team and they are seeing the same thing so they confirmed it as a bug and are looking into it.  They think it is something with field request messing up the SQL query.

Good news is offline my popup is super fast so I am ok for now.  Online it is taking 5-6 seconds on a iPad Pro and 13 on a regular iPad.

thanks

0 Kudos