I have two fields both are text and I am using the field calculator to calculate the empty field. The populated field is name "groupNames" which contains values such as below. The second field "agency" has no values and is where the calculated values are going. I am trying to use arcade to find any values in the "GroupNames" field that contain the agency acronym such as "DDOT", then calculate the empty field with "DDOT" otherwise populate with "Undefined". I have been using the Arcade statements below but cannot get them to work. Anyone have suggestions?
IIF(Find('DDOT', $feature.groupNames)== 0, "DDOT", "Undefined")
IIF(Find('DPW', $feature.groupNames)== 0, "DPW", "Undefined")
IIF(Find('CFSA', $feature.groupNames)== 0, "CFSA", "Undefined")

Thanks
Josh