Brian Dunning's FileMaker Custom Functions

LastButtonClic ( Self_NameObjectBar ; Button_BarButton )

Set variable $$LastButtonClic with the last button clic ( See FileExample )

  Average rating: 4.4 (34 votes) Log in to vote

Agnes Barouh   Agnes Barouh - Show more from this author
Tic Tac
http://www.tictac.fr/CoinFileMaker/Page.html

Share on Facebook Share on Twitter

  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 definition: (Copy & paste into FileMaker's Edit Custom Function window)

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

// LastButtonClic ( Self_NameObjectBar ; Button_BarButton ) V_1 - [05/08/2015]
// 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 )
*/

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: