May 22, 201114 yr Does anyone know of a way to calculate the attribute of active field position (Top, right), without using objects name or having to do different objects name for each field. Thanks Caps
May 22, 201114 yr What's the goal? Perhaps a trigger on each field that runs a script with GetActiveField ( )?
May 22, 201114 yr Author What's the goal? Perhaps a trigger on each field that runs a script with GetActiveField ( )? To open a new window or a plugin at the right position of that specific field. To do this, I need the current position of that field. How the getactivefield can handle with this?
May 22, 201114 yr I assume you're looking to create a script that incorporates as much indirection (context independence) as possible. Your answer, "to open a window at that field position or a plugin," doesn't make sense to me. Plugin? Also, what if the field is in the lower right-hand corner of the layout? Where should the new window appear? What's the purpose of the new window? Again, what are you doing? Please walk me thru a scenario. I feel that what you envision might not be the best approach or even necessary in FM, and since you list yourself as "entry-level" perhaps I've been there and done that and can save you from repeating my past mistakes.
May 22, 201114 yr Try = FieldBounds ( Get (FileName) ; Get(LayoutName) ; Get ( ActiveFieldName ) ) Note that this assumes you have only one instance of the field on the layout, and that the measurements are relative to the layout.
May 22, 201114 yr Author I assume you're looking to create a script that incorporates as much indirection (context independence) as possible. Your answer, "to open a window at that field position or a plugin," doesn't make sense to me. Plugin? Also, what if the field is in the lower right-hand corner of the layout? Where should the new window appear? What's the purpose of the new window? Again, what are you doing? Please walk me thru a scenario. I feel that what you envision might not be the best approach or even necessary in FM, and since you list yourself as "entry-level" perhaps I've been there and done that and can save you from repeating my past mistakes. Please see this image. I have one layout with a portal inside, and each field i perform an open trigger to run a script to run this plugin. The same example could be with a new window. I want that calculator next to that field (560), not in the middle of screen for example. There is any calculation to do this (I use a portal). Thanks, for the support Try = FieldBounds ( Get (FileName) ; Get(LayoutName) ; Get ( ActiveFieldName ) ) Note that this assumes you have only one instance of the field on the layout, and that the measurements are relative to the layout. Hi Comment, thanks for your suggestion. You give me the way, but also showed the problem. I'm using a portal inside this layout, so i have multiple instances, because I can repeat that field over and over (one for each record). Please see this image (previous post), how to get the position of each field? Thanks
May 22, 201114 yr It looks like you have only 5 fields in the portal - why not give them object names?
May 22, 201114 yr Author It looks like you have only 5 fields in the portal - why not give them object names? This database have more fields, but i did that (oject names). The idea was to have just one script without scriptparameters. Solution for others with same issue: set variable: $right GetAsText(GetAsNumber( GetLayoutObjectAttribute ( Get ( ScriptParameter ) ; "right" ; 1 ; Get ( ActivePortalRowNumber )) )+10) set variable: $top GetAsText(GetAsNumber( GetLayoutObjectAttribute ( Get ( ScriptParameter ) ; "top" ; 1 ; Get ( ActivePortalRowNumber )) )+50) Thanks to all, Caps
May 22, 201114 yr GetAsText(GetAsNumber( You don't need to do that - Filemaker will do the conversions for you automatically.
May 23, 201114 yr This is new to me. I've never seen the use of a calculator for data entry. Why would you do that, rather than have the user enter the required values and create a calculation field for the result?
Create an account or sign in to comment