Arcade in forms: Field value of newly added feature

429
1
Jump to solution
11-30-2022 10:22 AM
TamT
by
New Contributor III

If I add a new feature in Field Maps I like to populate a certain (empty) field with a specific value. All other features already have values in this specific field, only my new feature's field is empty. To populate this field I use the Arcade function "IsEmpty". But somehow this function doesn't work as expected.

How can I express in Arcade that a specific field of my new feature is empty?

0 Kudos
1 Solution

Accepted Solutions
Sean_Haile
New Contributor III

I recently found that on some devices I had to write the form calc expression as follows to get it to properly evaluate:

if (IsEmpty($feature.NUMM) == true){
	//I assume this field is numeric, not text?
	return 1;
}
else {
	return $feature.NUMM;
}

 

Also the field can't be editable by the user, or the expression won't evaluate.

 

View solution in original post

0 Kudos
1 Reply
Sean_Haile
New Contributor III

I recently found that on some devices I had to write the form calc expression as follows to get it to properly evaluate:

if (IsEmpty($feature.NUMM) == true){
	//I assume this field is numeric, not text?
	return 1;
}
else {
	return $feature.NUMM;
}

 

Also the field can't be editable by the user, or the expression won't evaluate.

 

0 Kudos