on 08-31-2009 9:36 AM
Hi Experts,
I am working on creating a Search help on Adobe Offline Forms, If anyone of you can just provide me some inputs on how to convert a string like
a* to a%
a** to a%
What i actually want is to convert any consecutive number of "*" to "%".
Please provide your inputs on this..
Thanks,
Amita
Thanks,
Amita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amita,
Try this in FormCalc,
Replace(s1, s2 [, s3 ] ) - Replaces all occurrences of one string with another within a specified string.
String.replace(s1, s2)
Thanks.
Best regards,
Xiang Li
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amita,
If you are performing the code change in Adobe Form then use the following code in the respective event:
( Reference: http://www.w3schools.com/jsref/jsref_replace.asp )
var str="Welcome to SAP";
str.replace(/SAP/g, "SAP IFbA"); //here "g" is used for Global Search; for more information please refer the link
If you are performing the code change in ABAP then follow the below and build your logic:
( Reference: F1 Help in ABAP Workbench for keyword REPLACE )
DATA: text1 TYPE string,
text2(18) TYPE c,
cnt TYPE i,
off TYPE i,
len TYPE i.
text1 = text2 = 'I know you know'.
REPLACE ALL OCCURRENCES OF 'know' IN:
text1 WITH 'should know that'
REPLACEMENT COUNT cnt
REPLACEMENT OFFSET off
REPLACEMENT LENGTH len,
text2 WITH 'should know that'
REPLACEMENT COUNT cnt
REPLACEMENT OFFSET off
REPLACEMENT LENGTH len.
Regards
Pradeep Goli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
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.