FeatureSetByPortalItem all fields expect

06-29-2021 02:45 PM
Labels (1)
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
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) {
return fields
0 Kudos
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