on 07-02-2015 7:15 AM
Hi All,
I need some help in writing a UDF function for one of my mapping. I have a numeric field, which may sometimes have hyphen in it and sometimes not.
My requirement is to check if this field has a length of 9 and has no hyphens in it. Can this check be done using standard mapping or if a UDF needs to be written can you help me out with the UDF?
Regards,
Lavanya R
Hi Lavanya,
your mapping logic is not very clear. If you only want to check the field length without hyphen then use the below logic
Input --> index of (hyphen) --> Greater then (-1) --> Not
Then check the length of input field using length function in text.
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lavanya,
Yes, this can be achieved with udf.
But first let's check with standard graphical functions, can you let us know according to your requirement, what should happen if the field has hyphens?
I am thinking, let's check whether the field has hyphens or not, if it is there then replace them with blank value, then find the length of the field is 9 or not. Please find below the screen shot for this:
Can you check this and let us know if this fulfill your requirement or not.
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.