on 08-04-2008 8:44 PM
Hi All,
My requirement is to search string Like "List Price",if the input field is having this string at any place i need to transfer input value to target.
Could any one help me on this writing a UDF for this.
Input : Final List Price Vendor
check for :List Price
then pass the other values to Target.
Thanks,
Madhu
Hi,
guess you can do it with standard functions:
Use the replaceString function to replace "List Price" with "" for your inputValue.
Then compare the result with the original inputValue (without replaceString).
If length is not equal (if without else)
then targetValue = replaced inputValue
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
public void search(String[] a,ResultList result,Container container){
String check = "List Price";
for(int i= 0;i<a.length;i++)
{
if(a<i>.indexOf(check) >= 0)
result.addValue(a<i>);
else
result.addValue(" ");
}
}
Regards
Sreedivia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check with this UDF
public String Search(String a,String b,Container container)
{
String c;
int i;
i = a.indexOf(b);
if(i == -1)
c = " ";
else
c = a;
return c;
}
Here a is the input and b is the search string.
0r
if the value of search string doesnt change dynamically then the UDF can be like this
public String Search(String a,Container container)
{
String c;
String b;
b = "List price"
int i;
i = a.indexOf(b);
if(i == -1)
c = " ";
else
c = a;
return c;
}
Edited by: malini balasubramaniam on Aug 5, 2008 9:15 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhu,
No need of UDF..
Use the Standard Function startsWith text function with the combination of if-else condition.
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
Just write a simple UDF for this.
Thanx
aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.