How can I condition the result in one field depending on what is selected in another field that has a list