IBM Business Process Manager


IBM BPM 7.5.1.1 - Restrict input text on coach to numeric


We are developing using WLE 7.5.1.1, and need to restrict a user to use only numeric values as input on a coach. The format on the Presentation tab is set to $ ###,###,###.## (which is obviously not forcing the user to enter numeric only). I tried to capture any non-numeric in javascript after the coach like this:
if(isNaN(tw.local.item.value))
{
tw.local.isValueEntered = false;
}
then pass the user back to the coach to enter a numeric value, but the entry fails before leaving the coach - I do not get to the script. The failure looks like this:
String "priceless" cannot be converted to "Decimal" type. The value is not double.
Am I missing something? Is there somewhere on the coach (or through the use of a function) that I can force the user to enter numeric only?
Thank you!
Roxanne
There are a couple of ways to do this: you can do this as the user types (http://stackoverflow.com/questions/995183/how-to-allow-only-numeric-0-9-in-html-inputbox-using-jquery), do it when the box loses focus (onchange) or do it when they attempt to move from the form.
The latter two are more 'preferred', since as the link comments suggest, keycodes are tad finiky and maybe break between localisations.
The solution for the latter two would be to setup a onchange/change event listener that runs 'isNaN(document.getElementById('mynumbersonlyinput').value)'. If that is true then it fails validation and keep the user on the page.

Related Links

RFE Shameless Plug - Coloured Notes
Testing framework for BPM project
How to get LDAP user attributes in IBM BPM 8.5?
Binding Sub CoachViews
Run/Execute task
How to add dojo.ready in Custom HTML
Validate the insatnce id
Start Process via REST API with TWDate as input
Rich text format
Link to Other Page using JS
Coach View Modify Control Type at Runtime
Unabel to see Process Server in Process Center Servers tab .
Task Assignment
Custom Palettes for BPDs and Services?
options for creating process instances using javascript API
Duplicate KPIs after upgrade

Categories

DW
IBM Blockchain
Application Performanc...
Unica
IBM SmartCloud Applica...
Vietnam
ibm_ru
dwjapan
test
Weblogs
FileNet Business Proce...
IBM Content Navigator
IBM Kenexa CompAnalyst...
Application Security
IBM Security Intellige...
Application Performanc...
NetInsight OnDemand
Cloud security
Cloud assurance
IBM SmartCloud Applica...
Facilities Management ...
Jazz for Service Manag...
Collaboration Network
Cast Iron Studio
Cast Iron Web Manageme...
IBM SPSS Statistics Sy...
Graphics
Getting Started with I...
Regional
Eventos en Latinoamérica
Технология Java
Rational Application D...
opensource
grid
autonomic
Test for Aparna
Wholesale
Insurance
Industry Network Forums
On Demand
Tivoli Netcool Perform...
Community
Eserver
Grid Computing
Power Architecture
Wireless
XML
Java
IBM DB2 Express-C Forum
DB2 for Linux, UNIX, a...
DB2 for i
IBM DB2 Analytics Acce...
Blockchain Technology
BigFix App for QRadar ...
Công ty thiết kế website
Master the Mainframe G...
Part 2 - Challenge #10...
WebSphere Message Broker
WebSphere Portal and P...
HA - High Availability
Right-click Integrations
QRadar Vulnerability M...
**NEW** Sterling File ...
Connect:Enterprise
Bottom of the BB
Release Bulletins
Multi-Channel Fullfill...
Gentran Server for AS/400
Sterling Secure Proxy
C3 Configurator
How Are You Using Sell...
Platform Issues
Commerce/Order Management
Release 5.6
SDK & Tools
Connect:Direct (Educat...
Receiving and putaway
Internationalization a...
Distributed Order Mana...
Database
WebSphere-MQ
Weblogic Misc
WebLogic - JMS
RDi Forum
Mathematical Programming
Questions and Best Pra...
Radar charts
Business/IT Issues & B...
OPL using CPLEX Optimizer
SAP
Форумы WebSphere
WebSphere MQ Family
IBM Simulation Producer
Tivoli Workload Automa...
IBM SmartCloud Control...
Tivoli Decision Suppor...
Tivoli Netcool Configu...
IBM Enterprise Asset M...
IBM i
IBM i: Logical Partiti...
Using developerWorks
iPhone
General Parallel File ...
IBM BladeCenter Forum
System i Hardware Mana...
Cell Broadband Engine ...
Power Architecture forum
IBM WebSphere Portal a...
XQuery and XPath forum
IBM Java Runtimes and ...
Server-side Java progr...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile