SELECT (IIF(cL_USE_AGAIN,m.lnSelRIDefi,"RIDefinitions"))Here I'ld go a different way. Since the code opening/selecting RIDefinitions is only executed once per trigger, I'ld set m.lnSelRIDefi in this branch as well and during the rest of the code always select (m.lnSelRIDefi). Cleans the code up and is probably faster in most scenarios, especially if selection is needed often in the lower parts of the code.