on 01-06-2011 3:28 AM
Hi Folks,
I am working on file to File Scenario.
I hava 1 input field Name : Account Number
If Account Number is need to map with field1 of output. whcih has length 10.
First I need to check Account Number is starting with digit or alphabet. If it starts with digit i need to add leading Zeros to show Output length 10.
If it is start with alphabet I need to show Output with trailing spaces.
For this how would I do in Gaphical mapping with out UDF.
Example If Account Number is 1345 then I need output as 0000001345
If Account Number is ABCD then I need Output is : ABCD .
I want to know that is there any gaphical Function to check that if Field is Didit or not.
Thanks,
Enivass.
Hey Enivass,
you can ckeck the input field "Account Number" whether it is numeric or Alphabet using *"Conversions ->Fixvalues"*
Steps:
1. Extract first character of input using *" Text -> substring"* -- start position 0 , char count 1
2. In Fix Value table you have to give following values:
Dafault value : Alphabet
key----
value
0----
Number
1----
Number
2----
Number
...
9----
Number
3. Write logic IF "number" than "Arithmatic -> FormatNumber (0000000000) -
// for leading zeros
ELSE
concat with extra space -
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
int count=0;
for(int i=0;i<input.length;i++)
{
String temp;
if (input<i>.length()>0)
temp = input<i>;
else
temp = input<i>;
for(int j=0;j<temp.length();j++){
if(count!=2){
if(Character.isDigit(input<i>.charAt(j)))
count = 1;
else
count = 2;
}
}
if(count==1)
result1.addValue("TRUE");
else
result1.addValue("FALSE");
}
-
Srikanth Srinivasan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can achive this requirement using graphical mapping it self,
use startswith standard function function with arithmentic or combination if then else it will work.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Enivas,
There is no standard function to check whether the input is integer / string. For your requirement, you need to write UDF.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nivas,
There are no functions in graphical editor that can check for digits and characters. All the other checks can be performed using graphical functions but for digit check , UDF is to be written.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.