cancel
Showing results for 
Search instead for 
Did you mean: 

UDF for counting the characters from right to left

former_member232455
Participant
0 Kudos

Hi All,

Can anyone help to write one UDF. I have a requirement to write UDF for counting the number of characters from right to left,if numbers more than 16.

Requirement:

Vendor Invoice number(truncate from right to left if vendor number
is more then 16 charecters..)

Thanks,

Janardhan

Accepted Solutions (1)

Accepted Solutions (1)

sahithi_moparthi
Contributor
0 Kudos

Hi Janardhan,

Please use below UDF:

if(input.length()>16)

{

input=input.substring(input.length()-16,input.length());

return input;

}

else

return input;

former_member232455
Participant
0 Kudos


Hello Sahithi,

Thanks for your prompt reply.

I have tested the above UDF and ti's working fine. Thank you so much...

Answers (1)

Answers (1)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Janardhan,

Use the below udf code for this.

Regards