Attribute rule works in Pro but does not work in Web App Builder

02-16-2024 10:11 AM
Occasional Contributor

I have an attribute rule that is working in SDE to update a parent feature class field when a new entry is added to a related table. The rule is not working when edits are made in the webapp. 

Is it not possible for attribute rules to carry over to webapps in Portal?


One guess I have is the thousands separator. The web map is configured to exclude the comma, but the editor widget ignores this setting. The code is based off a range of values :

if ($feature.GPM >= 1500) {
new_value = "Blue - 1500 GPM or Greater";
else if ($feature.GPM >= 1000) {
new_value = "Green - 1000-1499 GPM";

0 Kudos
3 Replies
Esri Frequent Contributor

The attribute rule is always run in the database, no matter the client.  If it works in pro, it works in a web app.  I assume the data is backed by an enterprise database, right?  ArcGIS online services do not support attribute rules.

0 Kudos
Esri Contributor

If you have your data in an enterprise database and published to your Portal as referenced, you can use the feature layer in ArcGIS Online as a service hosted in your Server, and the attribute rules would work. This is because the service would communicate directly with the database on your server to trigger these rules and then return the results.

0 Kudos
Occasional Contributor

I've tested the service in a WebApp Builder App and an Experience. It works as intended in the Experience but not the WAB app. My guess is the WAB editor widget, which ignores my map settings to exclude thousands separators, is creating a string that can't be properly evaluated. I don't know why else it would work in Experience Builder but not the other.

0 Kudos