We are trying to use a custom renderer based on a client's requirements that the values basically operate in two tiers of value:
If FIELD_ONE = ‘TIER 1’ AND DATE is within last 2 years then flag GREEN
If FIELD_ONE = ‘TIER 1’ AND DATE is not within last 2 years, then flag RED
If FIELD_ONE = ‘TIER 2’ AND DATE is within last 5 years then flag GREEN
If FIELD_ONE = ‘TIER 2’ AND DATE is not within last 5 years, then flag RED
We do not have any problems calculating the last 2 or 5 years for the DATE field, so that is not an issue. The actual issue is that the Renderer(s) that are available seem to only allow the use of one field or doesn't fit our needs.
We have tried using UniqueValueRenderer, but each date being a unique value creates problems. ClassBreaksRenderer does not apply either since the fieldName property only accepts one field. The best method yet that we've found is applying an Arcade expression to the layer's symbology in Portal, and then importing it into the code via PortalItem (still in progress). We would like to know if there are ways to render the layer client-side in the application using our conditions. We looked at ArcadeExpression type as well, but it did not look like there was a way to insert that into the Renderer types.