Skip to content

Instantly share code, notes, and snippets.

View fsans's full-sized avatar

Francesc Sans fsans

  • Indie developer
  • Barcelona (Spain)
  • 18:27 (UTC +02:00)
  • X @fsans
View GitHub Profile
@fsans
fsans / FMTimeHiRes.cpp
Last active November 9, 2018 08:55
FMTimeHiRes() plugin función
/*
* FMTimeHiRes.cpp
* PlugInTemplate
*
* Created by Francesc Sans on 16/07/12.
* Copyright 2012 Network BCN Software. All rights reserved.
*
* FMTimeHiRes({format})
*
* Returns Timestamp to microseconds precisión
@fsans
fsans / FMCF VarArrayToList.md
Last active December 13, 2023 18:21
Complement FileMaker Custom Function to deal with spreaded parameters by JSON.ToVars FMCF

VarArrayToList

EXPERIMENTAL

Complement FileMaker Custom Function to deal with spreaded parameters by JSON.ToVars FMCF, which returns (in current version) the json arrays as:

$p.data.to.0.address  
$p.data.to.1.address  
$p.data.to.2.address  

FM Sorting Column Headers

WARNING: in development

Togles sort order for a given column in current layout, with one click alternate sort order

Warning: this is pure experimentation and, as usual with FileMaker, a really ridiculous-complex workaround for a simple basic functionality. But, you know what…

# togles sort order for a given column in current layout

GetContainerMimeType(container)

Let(
ext = getContainerFileExtension ( data );
Case ( 
	ext = "aac" ; "audio/aac" ; 
	ext = "abw" ; "application/x-abiword" ; 
	ext = "arc" ; "application/x-freearc" ; 
@fsans
fsans / onLoad Callback FileMaker WebViewer.md
Last active July 8, 2022 11:30
Callback after javascript module full loaded, using a timed interval

onLoad Callback FileMaker WebViewer

Callback after javascript module full loaded, using a timed interval

$(function () {
  /* send a delayed onLoadEvent to request data preloading */
  const maxWaitingTime = 2000;
  const waitingTime = 200;
  var ctime = 0;
@fsans
fsans / FMCF SQL92 Timestamp.md
Last active December 13, 2023 18:36
Format FileMaker Timestamp to SQL92 syntax

SQL92Timestamp(fmtimestamp)

Let (
[ 
	_error = ""; 
	_dateOrder = JSONGetElement( Get(FileLocaleElements); "Date.DateOrderName");
	_elements	= Split( fmtimestamp; " ");
@fsans
fsans / FileMaker_ElasticSearch.md
Last active May 19, 2023 17:51
Integrate FileMaker with ELK stack using JDBC

Add logstash connection to FileMaker

Sync any FileMaker Table to ElasticSearch using Logstash with a JDBC pipeline. Make sure all fields are ISO compliant (keep naming in legacy SQL scope).

Create a jdbc simple pipeline...

input {
	jdbc {