Select to view content in your preferred language

Arcade code works for pop-up but not for attribute rule

619
6
09-14-2023 11:45 PM
TTtttTeee
New Contributor III

Hello community,

I have a question in relation to Arcade expressions. What I am trying to do is obtain a feature set from a feature service for my attribute rule. The FeatureSetByName code that I used for configuring pop-ups worked as expected. However, the same code did not work when configuring attribute rules. The error (001841) says "The table was not found."

Is there any limitation in Arcade or attribute rules that prevents us from configuring attribute rules using the FeatureSetByName code for a feature service?

Thanks in advance for your help.

TTtttTeee_0-1694759966337.png

 

Tags (2)
6 Replies
SarahRijneke
Occasional Contributor

If you're trying to access a feature service I would try FeatureSetByPortalItem; though I'm not 100% sure if it's possible to access feature services for attribute rules - all of the attribute rules that I have created use features that are stored in the same geodatabase.

0 Kudos
TTtttTeee
New Contributor III

Hi @SarahRijneke , thanks for your suggestion - have you ever tried this function and succeeded?

According to the Function Reference, FeatureSetByName "Creates a FeatureSet from a Feature Layer based on its name within a map or feature service.". The description does not stipulate any limitations for its use; hence, I just assumed it should be applicable for attribute rule.

I have found a feature service in a portal that I have access to. My goal is to create an attribute rule on my own data to extract some information from the service for my data. I have achieved this for pop-ups but it did not work for attribute rules unfortunately.

 

0 Kudos
SarahRijneke
Occasional Contributor

You need to access the feature using the correct feature set function. I attempted to access an item from my portal using the FeatureSetByPortalItem function and see an error in the attribute rule expression builder so perhaps this is not possible.

SarahRijneke_0-1695040274435.png

I added the portal item to my Pro project and FeatureSetByName($map...) does not seem to work in the expression builder either. 

SarahRijneke_1-1695041828193.png

0 Kudos
TTtttTeee
New Contributor III

Hi @SarahRijneke , thanks for your reply.

Yeah, same here. I tried both FeatureSetByPortalItem and FeatureSetByName but these did not work.

Do you know any work around to establish a connection to an portal item for attribute rules?

0 Kudos
SarahRijneke
Occasional Contributor

looks like your features either need to be in the same feature dataset or geodatabase for the arcade expression to work. I don't know of any work arounds.

SarahRijneke_0-1695125432261.png

 

0 Kudos
TTtttTeee
New Contributor III

Thats alight, I really appreciate for your support😀 

0 Kudos