Jump 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.

Entering a number with or without currency symbol

Featured Replies

Hi. I've been trying to come up with the best way to approach this situation:

My table has a numeric value, call it "price". The price is a currency value, but the currency in which the items are priced can be variable.

I'd like for users to be able to type in a currency value and a number into a field on the layout, for example "$50" or "£30" or "GBP 30" or "USD 50" etc... - and to have that automatically stored as two items: (A) the numeric value (50 or 30 etc) and (: a link to an entry in the Currency table (i.e. the currency-code or some other unique ID in a table of all currencies).

So the question is how to parse that user input...

Or maybe it would be best just to force the numeric value of the price to just be a number (strictly validated) and to have the currency as a drop-down?

Thoughts>

Edited by Guest

I'd suggest using a separate table, CurrencyId, the currency name, abbreviation and symbol. This way the user can use whatever text the choose without effecting the relationship.

FieldA = GetAsNumber ( Price )

FieldB = Trim ( Filter ( Price ; KanjiNumeral ( Price ) ) )

I'd say go with two fields to begin with. It's much easier to put values together than to separate them.

FieldB = Trim ( Filter ( Price ; KanjiNumeral ( Price ) ) )

Check your result with "-$12.34" or "EUR (56,07)"

Thank you.

( I suspect that a price isn't ever negative but the decimal point IS really a problem )

FieldB = Filter ( Price ; "$€£USDEURGBP[color:red]othercurrencies" )

Create an account or sign in to comment

Important Information

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

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.