on 08-22-2014 10:35 PM
hi Gurus,
I tried to use the rule editor to generate a string "{ .... }".
An illustrative example is shown below. However, it seems that the "{" causes some trouble here. The generated string is always "{}"
If the first sub-string is "{example", then the generated string is "{example}. It looks like if the sub-string contains "{", the concatenation stops right there and with an auto-filled "}".
If I replace the "{" and "}" with "[" and "]", the generated string is fine. Note that "{" is not considered as a special string in the string related function.
Is it a known bug? Otherwise, how can I generated a string with "{" and "}"?
The Agentry version is 6.0.44.
Thanks.
-Yang
Message was edited by: Michael Appleby
If the line has a { it also needs to have a } in the same line. What you can do it like
{ /* } */
This will have the second one commented out, but the line does have the both open and close.
Stephen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yang,
Is "{" the only special character in rule editor or there is a list of characters need special handling?
That is the only one I know of.
And for discussion purpose, if I do want to input a string like " {/*}*/ ", how should I format it in the rule editor?
Just like that:, but I was say add a space between the { and / for readability: { /*}*/
Stephen
Stephen,
With the following rule,
The generated string is "{ /* } */ xx% /* { */ }"
Although the problem with a single "{" is not there, but the string is not what I want. I want to have
"{40%}". I don't want to have "/* } */" in the final generated string. It cannot be interpreted as comment in our situation.
Thx.
-Yang
Yang,
If the braces are giving the rule editor a problem, then don't use them as constants in the rule. Create string globals that hold the braces: global.openbrace, global.closebrace. Then refer to the globals in your rule as parameters to the CONCATENATE:
CONCATENATE
global.openbrace
PROD logic block
global.endbrace
Jason Latko - Senior Product Developer at SAP
Stephen,
I got it by more experiment on my side.
Using /* */ can only help to prevent the auto complete of {}. We have to use the specific "comment" format which can be understood in the place where the string is generated.
The commented part is discarded by the interpreter of the string instead of by the rule editor.
Thx.
-Yang
Moved to SAP for Mobile. Not SMP related, application development question.
Regards, Mike (Moderator)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.