#GPPT Adding 6 Additional Item Category Fields

David Meego - Click for blog homepageHere is another awesome customization created using GP Power Tools. A customer requested additional Item Category fields, so this customization was created to double the number of Item Category fields from six to twelve.

The customization uses Modifier to add the additional fields to the Item Maintenance (IV_Item_Maintenance) window and the Inventory Control Setup (IV_Setup) window. The Report Writer has also been used to add the additional category fields to the Item List By User Category report.

As usual, all the resources are gathered together into customization project using the Project Setup window.

The project contains triggers for handling the CRUD (Create, Read, Update & Delete) events for the Item Maintenance and Inventory Control Setup windows as well as triggers for the fields and lookup buttons. There are some Runtime Execute scripts used for shared code as well as custom Report Writer functions, SQL Execute scripts for querying the data and creating a view to make it easier to see all the Item Category fields in a single data set.

After importing the project and adjusting security to provide access to the modified windows and report, you can go to the Inventory Control Setup window and define the additional six Item Category fields.

Clicking on the Expansion button opens the Item Category Setup window where you can add category values, long descriptions and URL values.

Once the categories are defined, you can use them in the Item Maintenance window on the Options window.

If you want to display the Item Category fields in a report, you can create calculated fields and use IV_CAT_IV_SETP custom RW function to get the names for the Item Category and the IV_CAT_IV_MNT custom RW function to get the values for the Item Category fields for an item. This RW function can return the Item Category value, as well as the long description and the URL, however due to the 80 character limitation on string calculated fields in the report writer, it will truncate the long description and URL fields to 80 characters.

If you use the IV_CAT_IV_MNTEX custom RW function you can specify a line length (up to 80 characters) and a line number to parse the long description and URL fields into lines.

The Item List By User Category Report has been modified to add the additional Item Category fields to the report.

If you want to access the addition Item Category fields in a custom Smartlist based on a SQL View, use the IV_CAT_SQL_VIEW SQL Execute Script to create the GPPT_IV_Category_View SQL View. Once you have this view you can join it to a SQL Query or view to display the additional fields.

Downloading and Installing

Download the example code, import using the Project Setup window (now possible for first time imports with Build 28.8 onwards), or use Configuration Export/Import window (for older builds):

WARNING: Installing the modified forms and reports will overwrite any existing changes to those forms or reports. Make sure you also change the Alternate Modified ID to use the modified windows and reports.

The code will be active on next login or after switching companies, or you can use start the triggers manually from the Project Setup window.

More Information

For more information see:


This article was originally posted on http://www.winthropdc.com/blog.

Please post feedback or comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.