I have a table in my geodatabase that has urgent care patient visits listed by market. I'm trying to develop a script that will select a certain lyrx based on what market the patient visit took place in. From the research I've done, it looks like the "if", "elif", and "else" statements would accomplish what I'm trying to do.
I'm thinking it would something like this:
If the layers are in the geodatabase, then the code sample(s) allow you to retrieve the list. It is a matter then of comparing through your 'if' statement.
my_layers = # this is where you get the list if Market_ID == "1000": # ---- don't put " " around numbers unless they are text ---- if "NY_ZipCodes" in my_layers: # then do something elif ........ # etc
You had better get a list of layers and if the lyrx files reside on disk, then you will have to provide the paths to them. I think your 'if' statement comes later, I would examine the code examples in the help topic I highlighted.