Select to view content in your preferred language

How to Auto-Populate a Full Address field using Attribute Rules

351
1
02-15-2024 12:49 PM
Labels (1)
aduyvesteyn
New Contributor

Hi All,

I am trying to create an arcade expression that allows me to auto-populate a Full Adress field using attribute rules in ArcGIS Pro. I have created an arcade expression for an address with a street number, street, and street type, which is shown below.

var streetnumber = $feature.STREET_NUMBER
var street = $feature.STREET_NAME
var type =$feature.STREET_TYPE
return Concatenate([streetnumber, street, type],' ')

But I need an expression that allows for me to have prefixes and suffixes that are only in SOME addresses. Below is what I need the addresses with a prefix or suffix to look like.

Prefix: 101-5888 ABC Avenue

Suffix: 5889C ABC Avenue

I am still learning arcade and your input is greatly appreciated!!

Thank You:)

0 Kudos
1 Reply
ZachBodenner
MVP Regular Contributor

You can use conditional visibility via the IIF function. 

var suff = $feature.Suffix
var s - IIF(!isEmpty(suff),suff,'')

This variable allows you to return the suffix if that data field is not empty, and if it is empty, it returns an empty text string. You can then just plug the variable s into your concatenate at the end. 

0 Kudos