FeatureSetByPortalItem all fields expect

342
2
06-29-2021 02:45 PM
Labels (1)
BenjaminBlackshear
New Contributor III

Is there a way to use FeatureSetByPortalItem to include all fields except for a handful?

my featureset has 86 fields and i want to use all of them in my data expression except for 6, is there a way i can specify the 6 to be exclude rather than specifying the 80 to include?

0 Kudos
2 Replies
DavidPike
MVP Frequent Contributor

I don't see anything in the docs to do so (obviously this is not an explicit no). 

Although not ideal and at the blatant risk of stating the obvious, you could list the fields in python easily, or even an arcade expression such as below and then remove unwanted fields.

var feat = $feature
var fields = []
for (var field in feat) {
    push(fields,field)
}
return fields
0 Kudos
BenjaminBlackshear
New Contributor III

Thanks, I ended up just making a view with only the fields I wanted and using that in the data expression

0 Kudos