I ran into an interesting issue with arguments while using the model glue framework. The argumentExists() method and the getArgument() method do not work well together when performing an iff(). For example:
iif(local.arguments.event.argumentExists('showAllCompanies'), de(local.arguments.event.getArgument('showAllCompanies')), de(''))
The same code rewritten in the more archaic fashion works perfectly such as:
if( local.arguments.event.argumentExists('showAllCompanies') ){ local.showAllCompanies = local.arguments.event.getArgument('showAllCompanies'); } else { local.showAllCompanies = ''; }
Very frustrating, but then again, an easy workaround once you know it.
No comments:
Post a Comment