Hi all,
I have a Field Change function operating on an Expense Report form. This function checks to see if the user has changed the value of a number of Expense column fields, and performs some processing / validation depending on the column field changed. One such process is to set the Tax Code based on the user selecting a Currency (when 'Use Multi Currency' is ticked).
I am finding that the function is correctly triggered when the Currency is changed, and also correctly sets the Tax Code field, however, based on the Execution Log, I can see that it runs the passage of code for the Currency Field Change twice. That is, it appears that when the user changes the Currency, my 'if name == currency' condition triggers, then based on certain rules, I set the Tax Code field, which then triggers the Field Change function again (which it should as a field has indeed just been changed - the Tax Code). This Field Change performs no actions in my script. So after the Tax Code has been set and the Field Change function triggered and run, it then runs the Field Change function again (for a 3rd time) suggesting that the Currency has been changed, which runs my code yet again and sets the Tax Code (for the 2nd time), before running the Field Change function again for the Tax Code field change event (also for the 2nd time), before finally stopping.
The tab key is only pressed only the once after changing the Currency in order to navigate to the next column, so I'm at a loss to explain why the function is called 4 times when only 2 fields have been changed.
Can anyone explain what is happening here, and perhaps suggest a better way to set a Transaction Column Field based on a change to a different Column Field?
Thanks heaps,
Kirk.