I'm working on a sleeping room web application, and I need help creating a symbology expression to draw attention to rooms with vacant beds available. My data is polygon data, representing the individual rooms. I'm planning to use the stock "capacity" field to note how many beds each sleeping room has. I then have 4 occupant fields (occupant_1, occupant_2 etc.).
I need an expression that will compare the quantity of non-Null occupant fields with the value in the 'capacity' field. I'd would like to be able to symbolize the output with Gray for Capacity = 0, Green for Vacancy (the number of non-Null occupant fields is less than 'capacity' value), and Red for Full (number of non-Null occupant fields is equal to 'capacity' value).
I am not familiar with how to assemble Arcade expressions, so any help would be much appreciated.
*Edit to add- I own the data table, so if it is best to use an arcade expression to calculate a new field as an intermediate before symbolizing, that is a possibility as well.