on 07-11-2007 2:28 PM
Hello Gurus,
Within XI I can use the text-function substring. I can define the start en end position within the function. But I want to be able to set the start en end position dynamicly. So sometimes the start postion needs to be 1 and another time it needs to be 2. How is this possible?
Best regards,
Guido
You may have to create a user defined fucntion for this.
I have created a "variable end" udf, but not the variable beginning.
This is the code I used..
public String SubstringWithoutLength(String a,String b,Container container){
int i = Integer.parseInt(b);
String c = a.substring(4,i);
a - valuefromidoc
b - length from length function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you need to create your own UserDefied function for this.
In the following example i am gettig the string and substring length. Depending on that i am returning the value. This will help you.
For example, Just check my code
//write your code here
int l =0;
l = a.length();
int c= Integer.parseInt(b);
return a.substring(l-c,l);
//write your code here
int l =0;
l = a.length();
int c= Integer.parseInt(b);
return a.substring(l-c,l);
Regards,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write ur own functinality and code in a UDF.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.