This is a companion discussion topic for the original entry at

This works for a simple code lookup, but I want to put it in a loop to do a string.contains operation for searching of the code in a list data type for the code. Then, I want to append a column to the row with the list column containing a dummy variable for that code (1 = found; 0 = not found). What sort of loop would do this?