Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4698 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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)? :)

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted (edited)

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
Posted

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.

Posted

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.

This topic is 4698 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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