@michael3, @andhikatj,
I will leave the IF function to another time. Here’s the logic for checking for specific dropdown values:
When you reference a dropdown column to return the labels, e.g.: {Deliverables#Labels}, it returns all of the labels selected delimited by comma & space in the order that they were selected. So, if “A”, “B” and “C” are all valid labels and for a given column value “C” and “A” were selected, {Deliverables#Labels} would return “C, A”. We can then use the SEARCH() function to see if it contains a particular value, like this: SEACRH(“A”, {Deliverables#Labels}). If found, the SEARCH() function returns the starting position where the value was found. In some systems a similar function will return zero if the value is not found. However, monday is returning an error in this case. So, to prevent the error we can make sure that it is always found by appending the value that we are searching for, e.g.: SEACRH(“A”, {Deliverables#Labels}&“A”). But, in this case we need to check if the find location was in the column value or the portion that we appended. If it was found in the column value the find location will be less than or equal to the length of the entire value. So, SEACRH(“A”, {Deliverables#Labels}&“A”) <= LEN( “A”, {Deliverables#Labels}) will return TRUE if “A” was in the column value and FALSE if it was in the appended section.
Now, if we want to check for more that 1 value concurrently, we can just string together similar searches inside an AND() function. AND(SEACRH(“A”, {Deliverables#Labels}&“A”), SEACRH(“B”, {Deliverables#Labels}&“B”), SEACRH(“C”, {Deliverables#Labels}&“C”)) will return TRUE if and ONLY if “A”, “B” and “C” are all found in the column value. If we wanted to check if ANY of these is found we can use OR() instead of AND(). OR(SEACRH(“A”, {Deliverables#Labels}&“A”), SEACRH(“B”, {Deliverables#Labels}&“B”), SEACRH(“C”, {Deliverables#Labels}&“C”)) will return TRUE if ANY of the values are found.
!!! One important caveat that must be considered: !!!
This will not work if some valid values are contained in other valid values. Specifically, if “A” and “CAT” are both valid values, when searching for “A” and “CAT” was selected, “A” would be found. To deal with this situation, one solution is to make sure that this can never happen by adding “start/end of value” characters to each value. So instead of “A” and “CAT” we could use “.A.” and “.CAT.”
Jim