Posted this above, but I'll recopy it here!
I am trying to discern what parcels do and do not contain brownfields. There are two brownfield datasets that I am referencing.
There can be three outcomes:
* A parcel contains Brownfield Dataset A
*A Parcel contains Brownfield Dataset B
* A parcel contains BOTH Datasets.
For example, I use select by location to see what parcels contain Brownfield A. With that selection, I use calculate fields to say "Brownfields = A".
Then I go in and do select by location to see what parcels contain Brownfield B. Half of the parcels in that selection happen to also contain Brownfield A.
However, when I use calculate fields to have "Brownfields = B", it OVERWRITES, my previous calculations making me unable to display parcels that contain BOTH parcels A and B in my attribute table.
I attempted to use the code below to fill in all the "NULL" values with B, and then replace all the "A" parcels that also contain Brownfield B with "A and B".
if (Brownfields == NULL):
return ' "B" '
else:
return '"A and B"'
However, because my "Brownfields" field is a text data type, this script was unsuccessful.
Essentially, I would like to know how to overwrite previous calculations to display multiple values in within one cell.