Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Trying to use single quotation in display pattern for printing

Avatar

Level 3

Hi all,

I'm trying to use the pattern feature of livecycle to help my users with entering in GPS coordinates.

I would like them to only have to enter numbers and decimals and have the N, W, ° and ' appear automatically. I have had success getting the first three to appear, but can't figure out how to include the single quotation for a minute mark since you have to use single quotations to specify the stuff you want to appear ('N', 'W', '°', etc.)

Does anyone know if it is possible to get the ' to appear automatically?

What I have right now is  text{OO' 'OO.OOOX' 'OOO' 'OO.OOOX} for the edit, validation, and data pattern fields

AND

text{'N'OO'° 'OO.OOOX'      W'OOO'° 'OO.OOOX} for the display pattern field

You will notice that the user currently has to enter the single quotation. It works fine, but I am trying to make it a quicker entry by dropping the ' as an entry requirement. Ideas?

Dave

6 Replies

Avatar

Former Community Member

In the place you want the right quotation mark, put this exact thing (single quotes and all)

'\u2019'

The way I understand things, since the quote mark is special (it affects other things in your picture code) you can't just put it in and expect it to come out.  So, you use the unicode character.  If that isn't the exact style of quote you want, go to http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html and find the one you want, then just change the number to match.  Make sense?  (By the way-I have no idea if this will mess up the rest of your picture code.  I don't see why it would, but that may just mean I'm blind )

Avatar

Level 3

Thanks for the help, but it didn't quite work.

However, it was very helpful in that I used a similar approach to get what I needed.

Basically I used Alt + 0180  to get this mark:   ´

I should have thought of it earlier because I had to use Alt + 0176 to get the degree symbol in there.

Anyway, thanks for your help!

Dave

Avatar

Former Community Member

You don't have to use single quotes in those expressions ....you can use double quotes. Then you shoudl be able to wrap your single quote in double quotes.

Paul

Avatar

Level 2

I know this is an old thread but would you happen to have the code you used?  I too am trying to display a single quotation mark in order to format a 'height' field (ie: 5'8").  Can't get it to work.  Any help would be greatly appreciated!  Thanks so much!

Avatar

Level 8

 

TextField1.rawValue = "5'8\""

Avatar

Level 2

Thanks so much for the quick reply.  I appreciate your time but I don't think that's exactly what I need.  I'm trying to make an input/display pattern that will automatically enter the single and double quotes:

So user enters 58 and it will automatically format to 5'8"

I can get the double quotes entered but not the single quote because single quotes in a pattern are meant to surround an exact phrase to use.