Select to view content in your preferred language

Arcade: Use related DB views as FeatureSets

828
3
03-17-2022 08:36 PM
Status: Already Offered
Labels (1)
Bud
by
Esteemed Contributor

 

It would be great if we could use related DB views as FeatureSets in Arcade scrips (just like we do with related FCs).

 

Tags (1)
3 Comments
JohannesLindner

You can do that.

Simple view:

SELECT Shape, BauwerkID, CONCAT('I am building ', BauwerkID) AS "TextID"
FROM database.dataowner.Bauwerke

 

Popup Arcade expression:

var view_fs = FeatureSetByName($datastore, "database.dataowner.TestView")
var bw_id = $feature.BauwerkID
var v = First(Filter(view_fs, "BauwerkID = @BW_id"))
if(v == null) { return "nothing here" }
return v.TextID

 

Popup:

JohannesLindner_0-1647599124177.png

 

 

You just can't use FeatureSetByRelationshipName(), because that relies on Relationship Classes, which you can't create for a view.

Bud
by

@JohannesLindner   Good call. I didn’t think it was possible.

This idea can be closed.

KoryKramer
Status changed to: Already Offered