Here is some example how you can use sofisticated programming features of AMODIT.
Let's say you want users to choose option from dropdown list and then set some parameters value depending on that choise. Of course you can use bunch of "if-then" statements to achieve it. But it will make code of the rule quite long and not so easy to maintain and to make changes.
Smarter and more tricky way is to put different value of parameters in descriptions of dictionary items. Look at picture below. It is in Polish but focus on syntax of descriptions (column "Opis").
OK, but how to extract value of parameters from it. You can do it using proper Regular Expression:
It looks pretty complex but saves a lot of code and makes changes easy...
Post a Comment