cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the & sign in a table column label?

Former Member
0 Kudos

Hello,

I would like to lable a table column with s String containing the & sign, for example: "a & b" but when I do this I get this result: "A & b" on deployment.

I tried giving the xml meaning at the label String, like this: "A & b" but again I receive an unwanted result.

How can I set the & than in a table column?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Roy,

don't know if I get you right.

If you want to concatenate two variables, you have to write for example

@firstname & @lastname

If you want the & to be displayed, like in "law & order", you should write "law & order". If this returns "law order" on deployment, try to write "law & amp ; order".

Try to clarify your problem with an example. I could not really understand where your problem is. Kind Regards,

Benni

Former Member
0 Kudos

Hello Benjamin,

I meant the second one: "law & order".

As I said, I've already tried setting "law & amp ; order" and it returns "law & amp ; order" on deployment.

Regards,

Roy

Former Member
0 Kudos

Hello Marcel,

If you mean put simply & inside the String than I've tried that and it doesn't work either...

Roy

Former Member
0 Kudos

HI Roy,

try to use the CHR()-function. This returns the character of an asci code. So CHR(64) should return the @-symbol.

So, write "law"&CHR(38)&"order".

Best Regards, Benni

Message was edited by:

Benjamin Leunig

Former Member
0 Kudos

Hi Roy,

Ok I forgot to note that this unicode should formatted as code:

It should looks like:

&#38 ;

without space, it doesn't work correct here in the forum.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Benjamin,

I tried using the CHR() function by setting: "law"&CHR(32)&"order"

But I receive this result on deployment: "law order" (meaning, without the & sign at all...)

Roy

Former Member
0 Kudos

Hi Marcel,

I tried this as a String to the label: "law & order"

And got this result on deployment: "law & order"

Roy

Former Member
0 Kudos

Hi Roy,

now I tried it out and you have to use for "law & order" the following formula:

"Law " & CHR(38) & " Order"

as Benjamin mentioned you can use the CHR() function. Maybe there is another escape sign.

For other HTML entities you can have a look here:

Best Regards,

Marcel<a href="http://www.w3schools.com/tags/ref_entities.asp">http://www.w3schools.com/tags/ref_entities.asp</a>

Former Member
0 Kudos

I set 32 which is space, need to put 38, like this:

I tried using the CHR() function by setting: "law"&CHR(38)&"order"

It's working now, thanks guys

Roy

Former Member
0 Kudos

Actually you should give 10 points to the person who solved yourr problem.

And: I added this to the Visual Composer WIKI

https://wiki.sdn.sap.com/wiki/display/VC/Usingspecialcharacters

Former Member
0 Kudos

Hi Mario,

Since both of them answered the problem correctly I though it would be fair to distribute the points among them therefore no one got 10 but both got 6 points each...

Message was edited by:

Roy Cohen

Former Member
0 Kudos

And 10 points you can give only once, I see

OK, 6 points for them is also nice...

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Roy,

if the sign is in apostrophe then it should display correct. Did you try unicode notation like &#38; ?

Maybe this works.

Best Regards,

Marcel