Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Adding a special character to the end of a field

Featured Replies

Hello Everyone,

 

I have a field that gives an image height, and an image width. What I am looking for is a way to type in a number and have the field automatically add a " to the end of the number. I believe this is done with a calculation field, but not positive.

 

Thanks in advance for any help.

Solved by comment

Go to solution

Yes, you could define a calculation:   Height_inches:   Height & """

 

The backslash () allows you to escape the " in your calculation, thus adding a " in the text instead of acting as the end-of-text delimiter.

A consideration ...

 

If you create a calculation then that is fine but if you plan to do what you say which is "type in a number and have the field automatically add a " to the end of the number" meaning you want to use Auto-Enter (replace) calculation then it can be problem.  Using Height & """ can produce double quotes at the end so if you wish to use it as auto-enter then you might consider instead using:  

Let ( n = GetAsNumber ( Self ) ; n & """)

This will protect from getting double quotes if the field is changed.  But further, might we be able to skip all of this?  Do you really NEED a calculation field even?  If the inches are for display only then you can use merge field such as:  <<Height>>".  You can also use merge variable with conditional format for displaying more complex calculations.  Duplicating a field value (plus adding another calculation to your definitions) carries a cost whereas layout-level solutions are quite thrifty.

 

Just some ideas.

Oh geez ... even better of course ... GetAsNumber ( Self ) & """   :idot: 

  • Solution

Why not simply format the field to display the " as a trailing currency symbol?

Oh!  Much better!

 

I also wanted to mention that, although FM allows text characters within a number field (where Height and Width should be number), it usually is best to keep number fields pure.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.