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.

Featured Replies

I have written a calculation and I think there should be a simpler version but i cant work it out

I have twelve fields where a user should enter either a numeric value or a percentage. The fields together comprise a calculation to add a profit margin to airfares stored at buying price in the database. A user may specify a fixed price markup or a percentage depending on passneger tyrpe , one way or return and wholesale or retail.

I use a single calculated check field to check each filed in sequence and return a value to show the first field with invalid data... so I use a case statement.

What i have written for field one is

Case (not( (Right ( Ag_AD_RT;1 ) ="%" ) and( ((Length ( GetAsNumber ( Ag_AD_RT ) ))+1) = (Length ( Ag_AD_RT ))) )and

Length ( GetAsNumber ( Ag_AD_RT ) )<>Length ( Ag_AD_RT );1;

not( (Right ( Ag_CH_RT;1 ) ="%" ) and( ((Length ( GetAsNumber ( Ag_CH_RT ) ))+1) = (Length ( Ag_CH_RT ))) )and

Length ( GetAsNumber ( Ag_CH_RT ) )<>Length ( Ag_CH_RT );2; ....etc etc

and then repeated to include all fields one at a time with a final value if all data is valid... ie failed all tests to find incorrect data

This works... but am i being overcomplicated?

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.