LastButtonClic ( )

Function stats

Average user rating
46
383
9999
Support
FileMaker 10.0 +
Date posted
28 July 2015
Last updated
05 August 2015
Version
Recursive function
No

Author Info
 Agnès

17 functions

Average Rating 4.6

author_avatar



 

Function overview

Prototype

LastButtonClic  ( Self_NameObjectBar;   Button_BarButton )


Parameters

Self_NameObjectBar  Self or NameObject


Button_BarButton  Button or BarButton


Description

Tags:  Objects   Name   Layout objects   Layout   Interface   Button  

** [05/08/2015] Open the file in v12 and v13 for button simple

// LastButtonClic ( Self_NameObjectBar ; Button_BarButton ) V_1
// LastButtonClic not recursive
// Compatible : for buttonBar - FM_v14 Only - FmGo, Pro, local /remote
// Compatible : for buttonSimple - FM_v12 v13 v14 - FmGo, Pro, local /remote
// Not compatible WebDirect / Button PopOver

/*
Result : Set variable $$LastButtonClic with the last button clic
**Put the calc with CustomFunction in the conditional**

• Self_NameObjectBar >
- Self - for simple button or barButton with just one segment
- NameObject - for barButton with more one segment
• Button_BarButton >
- Button - for simple button or barButton with just one segment
- BarButton - for barButton with more one segment
*/

//---------------------------------- File Example
// http://www.tictac.fr/CoinFileMaker/PageLastClicName.html
//---------------------------------- Example
/*
•• conditional formatting calculation is about 3 milliseconds before the script parameter

calc place in the conditional
LastButtonClic ( Self ; "Button" ) result > $$LastButtonClic contain the title of the button ( v12 - v13 - v14 )
LastButtonClic ( "B1" ; "BarButton" ) r esult > $$LastButtonClic contain the nameObject of the button ( v14 )

$$LastButtonClic, which can recover / use since ScriptParameter or in the beginning of the script ( the first ScriptStep => $Clic = $$LastButtonClic for example

***[note] you can addapt the Cf for ButtonBar and for performance in mode List :
remove the Evaluate () at the last of calc and put the Evaluate in your script ( or parameterScript ) :
$ResultClic = Case ( Left ( $$LastButtonClic ; 3 ) = "Let" ; Evaluate ( $$LastButtonClic ) ; $$LastButtonClic )
*/

Examples

Sample input

LastButtonClic ( Self ; "Button" )
------------
LastButtonClic ( "B1" ; "BarButton" )


Sample output

$$LastButtonClic contain the title of the button
------------
$$LastButtonClic contain the nameObject of the button

 

Function code

// LastButtonClic ( Self_NameObjectBar ; Button_BarButton ) V_1
// LastButtonClic not recursive
// Compatible : for buttonBar - FM_v14 Only - FmGo, Pro, local /remote
// Compatible : for buttonSimple - FM_v12 v13 v14 - FmGo, Pro, local /remote
// Not compatible WebDirect / Button PopOver

/*
Result : Set variable $$LastButtonClic with the last button clic
**Put the calc with CustomFunction in the conditional**

• Self_NameObjectBar >
- Self - for simple button or barButton with just one segment
- NameObject - for barButton with more one segment
• Button_BarButton >
- Button - for simple button or barButton with just one segment
- BarButton - for barButton with more one segment
*/

//---------------------------------- File Example
// http://www.tictac.fr/CoinFileMaker/PageLastClicName.html
//---------------------------------- Example
/*
•• conditional formatting calculation is about 3 milliseconds before the script parameter

calc place in the conditional
LastButtonClic ( Self ; "Button" ) result > $$LastButtonClic contain the title of the button ( v12 - v13 - v14 )
LastButtonClic ( "B1" ; "BarButton" ) r esult > $$LastButtonClic contain the nameObject of the button ( v14 )

$$LastButtonClic, which can recover / use since ScriptParameter or in the beginning of the script ( the first ScriptStep => $Clic = $$LastButtonClic for example

***[note] you can addapt the Cf for ButtonBar and for performance in mode List :
remove the Evaluate () at the last of calc and put the Evaluate in your script ( or parameterScript ) :
$ResultClic = Case ( Left ( $$LastButtonClic ; 3 ) = "Let" ; Evaluate ( $$LastButtonClic ) ; $$LastButtonClic )
*/

//-------------------------------------------------------------------*/
// Agnès Barouh - Juillet 2015 - Report - Substitute( filemaker§tictac.fr; §; @ )
//-------------------------------------------------------------------*/

Case (

Button_BarButton = "Button" ;
Let ( $$LastButtonClic = Self_NameObjectBar ; "" ) ;

Button_BarButton = "BarButton" ;
Let ([
LV = GetLayoutObjectAttribute ( Self_NameObjectBar ; "containedObjects" ) & ¶ ;
Calc = "Let ([V = \"" & Substitute ( LV ;
[ ¶ ; "\" ; R = Case ( GetLayoutObjectAttribute ( V ; \"objectType\" ) = \"button\" ;Case ( GetLayoutObjectAttribute ( V ; \"isActive\" );
v ))]
; R ) & ¶Let ([V = \"" ]) & "\"];\"\")" ;
$$LastButtonClic = Evaluate ( calc )
];
"" )
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/383

    Prototype: LastButtonClic( Self_NameObjectBar; Button_BarButton )
    Function Author: Agnès (http://www.fmfunctions.com/mid/46)
    Last updated: 05 August 2015
    Version: 1.2

*/
// ===================================

 

 

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (32)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Layout  (15)
Interface  (15)
Text  (14)
Variables  (12)
Filter  (11)
Layout Objects  (11)
Design  (10)
Array  (8)