IWEventRegistry.addItemHandler("/rootcontaineritem/fieldABC", "onItemChange", toUpperCase);function toUpperCase(item) { item.setValue(item.getValue().toUpperCase()); }IWEventRegistry.addItemHandler("/rootcontaineritem/fieldABC", "onItemChange", leftTrim);whose associated function works as follows: function leftTrim(item) { var objRegExp = /^(\s*)(\b[\w\W]*)$/; item.setValue(item.getValue().replace(objRegExp, '$2')); }How do I combine the two functions on one field in the DCT?
Thx, Nidhi,I did implement a similar script to the one you posted, and it works fine. Only drawback, is that I want to reuse the functions for different fields, and as such don't want to tie the functions together. I am hoping for the ability to call either or both (or more later) depending on the situation.Thx for the help.
JonathonG and I will be covering this topic in our presentation at GearUp this year. Unfortunately, we will not be making the solution available until after GearUp. I will try to remember to come back to this post and add a link to the tech library article when it is created.