iModernize - The Profound Logic Software Blog

Tips and Tricks: Advanced Conversion Theme Magic: Part 1

Posted by BrianMay on Sep 16, 2014 1:06:54 AM

I wanted to do a series of blog posts about more advanced conversion theme functionality. This is an area that we get questions on quite often. So in this and upcoming posts, I will lay out some examples of things you can do in conversion themes with a little bit of code.

Today, I want to talk about the “add enhancements” property of a conversion theme. This property is used to provide your own custom JavaScript function that will run during the conversion process. The “add enhancements” property should be set up as a function with 3 parameters. The first will be a JavaScript object with all of the items in the record format. The second will be a flag to let the function know if this is a subfile record format, and the third a flag to indicate a window. Here is a small example:

Advanced Theme MagicThis example retrieves the list of “items” from the record format object and then loops through them. Then it determines if the item is a textbox bound to a date field. If so, it applies properties to transform the textbox into a date field widget. The code is actually pretty simple if you are familiar with JavaScript.

Next time, we will look at a more advanced example of “add enhancements” where we will make multiple modifications in the function.

Topics: Tips and Tricks

Subscribe to Blog Updates

....and get The 2017 State of IBM i Modernization White Paper FREE!

cover page.png

Recent Posts