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.

Get(ActiveFieldName) of portal field

Featured Replies

Hi!

I´ve been trying to get the field name of a portal field, but the expression Get(ActiveFieldName) refers to the name of the field of main table in the layout.

Any help would be highly appreciated.

Thanks.

but the expression Get(ActiveFieldName) refers to the name of the field of main table

Get ( ActiveFieldName ) returns the name of the field - whether parent or portal (child). Maybe you can explain what you are trying to do and describe your setup (the table names and their relationship)? :)

  • Author

Get ( ActiveFieldName ) returns the name of the field - whether parent or portal (child)

Ok, I have a Button setup... Perform Script option for that field; I disabled it and now it returns the name of the portal field. The question now would be how to do it while keeping button setup option.

The question now would be how to do it while keeping button setup option.

The question now would be what is it you are trying to do. If a field is defined as a button, clicking it does NOT make it the active field.

  • Author

It is a long way, but at this point I need to capture the active field name, but at the same time I need to perform a script when clicking on it, as the scripts assigns a value to variable $unit using this calculation:

Case (

Get (ActiveFieldName) = "kilom_01"; preventive::unit_01_number;

Get (ActiveFieldName) = "kilom_02"; preventive::unit_02_number;

Get (ActiveFieldName) = "kilom_03"; preventive::unit_03_number; ... until 20

... where Preventive is the parent table and kilom_01...20, belong to portal Lines

I am afraid I don't follow this to the end. It seems like you need to rethink your entire approach: having numbered fields is almost always a symptom of inadequate data structure.

  • Author

Ok, yes, maybe you are right. That´s why I just wanted to see if you know any trick to capture the activefield name without removing de Button setup to perform the script. Everything else is working good, only that step is the problem.

Ok, yes, maybe you are right.

Oh yes, Comment is right - it is "symptom of inadequate data structure."

Everything else is working good,

For now. But please keep in mind his suggestion that your structure is probably incorrect. And next time you hit a similar road-block, remember why ...If you have 20 fields - they should be records instead.

Truly, you should consider at least having it reviewed before you invest your precious time only to have to remove most of it and start over. The base is the most important ... structure is EVERYTHING, just like in a house. You are potentially building your house on sand and we are suggesting you re-think it. We'll help you; but you will need to ask. Some folks like houses that tip sideways and sink in the sand. Who are we to say what you want? :laugh2:

Edited by LaRetta

  • Author

Just to give an idea of what I´m talking about. This layout is showing 14 of 20 fields for each unit.

post-104315-0-81655500-1331418833_thumb.

Ok, yes, maybe you are right. That´s why I just wanted to see if you know any trick to capture the activefield name without removing de Button setup to perform the script. Everything else is working good, only that step is the problem.

Comment already mentioned that clicking a field formatted as a button DOES NOT MAKE IT ACTIVE. A field is active when it contains the cursor.

You could attach a script parameter to each button. That may solve your current problem but - as LaRetta said - there will be others.

  • Author

I have already assigned a script parameter from 1 to 20 to catch other info from the related records, in the same script. Yes, I´ll try your recommendation and let you know what happened.

  • Author

Ok, it is working good now, it´s doing what I was looking for. Thank you all for your professional support. I´ll take all your advices into account.

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.