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.

Calculation fields options

Featured Replies

Hi,

In my solution I have two fields labeled "Alc percent" and "Alc Proof". Originally, I had the "Alc Percent" field as a simple calc "Alc Proof / 2". However, I would like to allow the user to enter data into either Field. If "alc Proof" is entered then the "alc percent" field calculates "Alc Proof / 2". If "alc percent" is entered then "Alc Proof" calculates "alc percent * 2". Can I do this with just calcs and not use scripts and globals? I have tried auto enter calc replacing existing data but it only works when I change the "alc proof" value. If I change the "alc percent" value, it reverts back to the "alc proof / 2".

Prompt for what you're entering (Proof or Percent); then enter the number; then calculate the other (depending on the prompt).

  • Author

This would need to be a scripting function, correct? I am hoping to just use field calculations to do it. I was trying to figure a way to use the example plug-in from Dev 7 to trigger a script when the field is exited, but I don't think I can pass a parameter based on which field is used

Make both calculations numbers with an auto-enter calculation.

Alc Percent := Case( Get(ActiveFieldName) = "Alc Proof"; Alc Proof / 2; Alc Percent )

Alc Proof := Case( Get(ActiveFieldName) = "Alc Percent"; Alc Percent * 2; Alc Proof )

Deselect 'Do not replace existing value for field' checkbox on both fields.

  • Author

Great! Thanks

I never thought this possible, but yes:

You can do it doing field auto enter calculation only.

FileMaker 7 amazes me ervery day ....

alc proof =

If(

not IsEmpty(alc percent) and (Get(ActiveFieldName)= "alc percent" );

alc percent * 2;

alc proof)

alc percent =

If(

not IsEmpty(alc proof) and (Get(ActiveFieldName)= "alc proof" );

alc proof / 2;

alc percent)

see attached sample

BTW,, foreigners, you can copy the English calc formulas if you use a copy of FileMaker 7 with all other languages removed. (at least in MacOS X). Both copies can be used at the same time....

Pasting English formulas works in Native language version, they will be automatically translated.

I always type the English Right() and Middle() functions instead of German ZeichenRechts(), ZeichenMitte() in my German language FileMaker... and let() instead of SetzeVars().

alc.fp7.zip

Hi Queue,

this was X-posting.

Yes, it takes time to translate ...

Hi Christian,

Thanks for the tip for the English calcs being converted / accepted.

And Yes, FM7 is just as promised. Less work-arounds (I used double lookups in prior versions for this) and daily good surprises.

The Get(Active...) functions do not always update properly when used in calculations. I believe they were meant for scripts. There may be times you'll need to change layouts for them to change or modify a field (which you are doing). So it may work in this instance because you are referencing a field being changed (?) but I've had them fail to update on me when used in calculations. crazy.gif

Similarly, and for the same reasons, an Auto-Enter (Replace) using a Get(Active...) function may not be reliable? I will have to play with this whole concept and test all of this further. Thank you Queue! This is a wonderful eye-opener for me too! Oh yes, FM7 blows my mind (and humbles me) on a daily basis. I've 'restyled' one TOG 15+ times already ... each time taking further advantage of the power of 7 and eliminating 'old style' thinking. The wonders of 7 never end. smile.gif

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.