on 03-23-2007 6:52 AM
Hi All,
I am working on Visual Composer (NW2004s). I am having a String in form <b>AX:AX:BT:I</b> I want to find if AX and AX are same or not in that string with help of functions. Also I am not sure that lenegth of characters before ':' will be same every time. Can any one tell me solution for this.
regards,
sheetal
Hi Sheeetal,
I looked at the string functions available in Visual Composer (NW2004s). I think it is not possible to search for a specific string (i.e. for the ":" ). As you haven't the possibility of developing iterations, neither, I think you should use a BAPI or webservice therefore. I.e. pass the string AX:AX:BT:I to a BAPI and receive the result you want, for example "AX:BT:I" or "Double occurence of AX" or whatever.
Best Regards, Benni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Do you want to say that you want to check whether the 1st and 2nd value between ":" are same or not.
Thanks & Regards
Harsimran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i'm not sure if it works, but you could try working with the Text Function AT(text,pos) if the 2 value's are a fixed locations within the string you should be able to do compare them within a formula
something like:
IF( ( AT(nameString,0) == AT(NameString,3)) && (AT(nameString,1) == AT(NameString,4),DoSomething,DoSomethingElse)
Hi Sheetal, hi Andre,
I thought about this possibility, Andre mentioned, too. But as Sheetal said, the length varies. Thus, you need a loop, which is not possible in VC.
However, you can extend the formula. If you are sure, that the length is between 1 and 3 characters, you can use the following <b>Pseudo-Syntax!!!</b>:
IF (character1 = character3) <i><-- case A:A</i>
OR IF ((character1 = character 4) AND (Charachter2 = character 5)) <i><-- case AB:AB</i>
OR IF ((character1 = character 5) AND (Character2 = Character6) AND (Character3=Character7)) <i><--case ABC:ABC </i>
Best Regards, Benni
Hi Sheetal, Benjamin, Harsimran
I missed the part of the changing length. i think benjamin's solution should work here. but i think you should add an extra check, this code for A:A also responds when on AAA:BBB because the first and third char are thesame.
IF ((character1 = character3) AND (character2 = ':')) <-- case A:A
OR IF ((character1 = character 4) AND (Charachter2 = character 5) AND (character3 = ':')) <-- case AB:AB
OR IF ((character1 = character 5) AND (Character2 = Character6) AND (Character3=Character7)AND (character4 = ':')) ) <--case ABC:ABC
Regards,
André
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
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.