on 02-19-2008 8:22 PM
Hi All,
I have a field matnr which is displayed on the adobe form with the leading zeros. Eg 000000000001003800, However I want this field to get displayed in the internal format such as 100-3800. How to get this resolved. Has anybody worked on the same before.
Regards,
Sanjay.
Sanjay,
Try this approach...
Create the following 2 java script functions in the docReady event if that field is getting pre populated by the time the form is displayed.
function trimNumber(str) {
while (str.substr(0,1) == '0' && str.length>1)
{
str = str.substr(1,9999);
}
return str;
}
function formatYourWay(str) {
//implement to get it in the format of "100-3800"
return str;
}
on docReady event of the filed use the following code.
this.rawValue = formatYourWay(trimNumber(this.rawValue));
Thanks!
Surya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.