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.

using get(ActiveFieldName) in a calculation

Featured Replies

  • Newbies

I'd like to write a calculation that uses the field name (that the calculation is in) as part of the expression. For example, if a have the field "Count Code 30" and I'd like to have the "30" usable inside the calculation, can that be done? I tried using get(ActiveFieldName), but that doesn't seem to do anything (it seems to be blank no matter what I do). Here's what I tried:

Case ( Cat1 = GetAsNumber(Right (Get ( ActiveFieldName ); 2)) ; 1 ; 0)

+ Case ( Cat2 = GetAsNumber(Right (Get ( ActiveFieldName ); 2)) ; 1 ; 0)

+ Case ( Cat3 = GetAsNumber(Right (Get ( ActiveFieldName ); 2)) ; 1 ; 0 )

Ideally, this would check each of the 3 fields (Cat1, Cat2, Cat3) for the code number pulled from the field name and tally the total (which should be a number between 0 and 3). I am just getting zeros, however (because get(ActiveFieldName) is returning nothing).

Any ideas?

I just posted a question about the same funtion above a few days ago. I am told, and it tests out, that the function (get active field name) will update only in certain settings (setfield command, refresh, ...) See the post "get(ActiveFieldName) won't work" and the added answers. Good luck.

  • Author
  • Newbies

Thanks to both of you. I had seen that thread yesterday when I was searching through the forum. I was hoping that I since was doing something different than Oldsneakers (my calculation actually only needed to run when the field itself was created) there might be a solution. Moreover, I think I need a different method than get(ActiveFieldName), since I just want to access the name of the field itself, not whatever the user is currently clicking in. So, I guess I really need "get(FieldName)" or "get(this.FieldName)".

In any case, it sounds like get(ActiveFieldName) doesn't work in calcuations (even if it is what I needed) and that there is no way to access reflective information about the field itself (from within the field). Oh well, I thought I had come up with an elegant way to reduce typing...

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.