Symbology change based on days past, and parsed by different attributes

95
2
03-11-2020 08:40 AM
Highlighted
New Contributor II

I want to have a feature class known as "treatments" to change from green to red based on a certain number of days. Within treatments there is a attribute " product" and each product is effective for a number of days. In the attached picture is a sample code I was given by Mark Brockenhauer how would I go about modifying this for each product? For example, one named Natular 30 lasts 30 days and one named Vectobac lasts 6 days.

Tags (2)
Reply
0 Kudos
2 Replies
Highlighted
New Contributor II

Just want to update anyone that was interested... I developed an expression that works. Feel free to use it.

what happens is checks the attribute of the field "product" until it matches the input, then checks the date and returns a variable "status" that is either "New" or "old" based on the number of days passed since the creation date and now. if it doesnt match the first line of code then it moves onto the second and third, and so on. Each product has a different effective date, so you can add as few or as many different products as you like. Also this does show up on mobile devices in collector

ps sorry for the tiny image

Reply
0 Kudos
Highlighted
Frequent Contributor II
Reply
0 Kudos