Maximo sometimes does not display all the characters in a field, because the text box is too small. Of course, you can solve this. First you need to understand how Maximo determines the display size of the text box. Then you can change these setting and control how large the text box should be.
Setting default field size globally
Maximo stores the default field sizes in the file SMPDIR/maximo/applications/maximo/properties/field-size-config.xml
The default configuration for ALN fields is the following.
<maxtype name="aln"> <range below="2" size="2"/> <range upper="30" size="10"/> <range upper="31" size="40"/> </maxtype>
This means that for ALN fields of type:
- the display size is 2 when the database field size is smaller or equal to 2
- the display size is 10 when the database field size is between 3 and 30
- the display size is 40 when the database field size is equal or greater than 31
Changing the field-size-config.xml ranges will affect the display size of all fields of the specific data type.
After making any changes to the field-size-config.xml you will need to rebuild and redeploy the maximo.ear for your changes to take effect.
Changing attribute size in Database Configuration
To modify the display size of a field, you can just change the attribute size in Database Configuration so that it falls in a different range.
For example, increasing the size of an UPPER field from 15 to 35 will increase the display size from 10 to 40. This is because it will fall under another range in the field-size-config.xml file.
I don’t like this solution because I always try to define the correct attribute sizes in the database.
Setting field size Application Designer
The last approach is my preferred one. It will not increase size of all fields like the customization of field-size-config file, and does not require to change the attribute size on the database.
Many settings described below require to export the application configuration from Application Designer and modify the XML manually.
The USEFIELDSIZEGROUP attribute
If you want to change the display size of only one field on a specific application screen, you can add USEFIELDSIZEGROUP=”FALSE” to the text box properties in the application xml. Maximo will then use the database field size as the display size.
Here is an example of setting the usefieldsizegroup attribute.
<textbox dataattribute="siteid" id="main_grid1_3" usefieldsizegroup="false"/>
In some cases you can set the exact size of a control in the application XML using the size or width attribute. However, it is not easy to find the correct attribute to set for each control.
Here is an example of setting the size attribute.
<textbox dataattribute="siteid" id="main_grid1_3" size="50"/>
Here is an example of setting the width attribute.
<textbox dataattribute="siteid" id="main_grid1_3" width="200"/>
Unfortunately, latest versions of Maximo have an inconsistent way of specifying field sizes in Application Designer so I decided to spend some time testing the different approaches on a clean Maximo 126.96.36.199 environment. I do not guarantee these settings will work on different versions of Maximo.
For my investigation I have first inspected control properties in SMPDIR/maximo/applications/maximo/properties/control-registry.xml file. Then I have tested the different combinations to verify which ones are working.
Here is the outcome of my analysis.
|Multiparttextbox||YES||–||Adjust size of the entire control.|
|Table||–||YES||–||Adjust size of all columns to fit width.|