HiIs it possible to make an expression in my Field maps formula, where the value of attribute1 (an integer) = 4 if the value of attribute2 (a string) is not null.
Regards Rasmus
Thanks for the answers. I tried both solutions (replacing attribute1/2 with the actual field names of course) but I keep getting an error when i try to save stating that the formula is invalid.
Yes, you can do this with an Arcade expression in Field Maps.Example:
if (!IsEmpty($feature.attribute2)) {return 4;} else {return $feature.attribute1;}
This sets attribute1 = 4 only when attribute2 is not null. Otherwise, it keeps the original value.
Hi, This is possible - it will require you to have an editability expression and a value expression on attribute1.
editability expression must return 'false' if you want the value to calculate, so it would look like:if (IsEmpty($feature.attribute2)) { return true };return false;value expression just needs to handle the calculation: (this won't fire if editability = false)if (!IsEmpty($feature.attribute2)) { return 4 };
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.