IBM Support

Limiting The Number Of Characters In A Field In Mobile

Question & Answer


Question

Can I limit the maximum number of characters that can be entered into a field in mobile?

Answer

The maximum number of characters that can be entered in a field is defined in the DB Configuration application. However, you can limit the number of characters to fewer than what is defined in the configuration. For example, a
field might be configured in Database Configuration to hold a maximum of 12 characters. You can change the limit to any number less than 12. You cannot expand the field to hold more characters than configured in the database.
To limit the field to fewer characters, add the ''maxdatalength'' attribute to the <textbox> tag. The following example restricts the field to two characters.

Example:
<textbox id="wodesctxt5" dataattribute="WOPRIORITY"
maxdatalength="2"></textbox>


Run importall and packagemobile after making the changes.

Redeploy your new jar files.

[{"Product":{"code":"SSLL3Y","label":"Maximo Mobile Inventory Manager"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Mobile Inv Mgr","Platform":[{"code":"PF033","label":"Windows"}],"Version":"6.2;6.3;6.4;6.5;7.1;7.5","Edition":"All Editions","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSLL52","label":"Maximo Mobile Work Manager"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Mobile Work Mgr","Platform":[{"code":"PF033","label":"Windows"}],"Version":"6.3;6.4;6.5;7.1","Edition":"All Editions","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
23 June 2018

UID

swg21404697