Title

Industry

Location

Interests

Website URL

Skype

AIM

MSN

Yahoo

Jabber

ICQ

OS Version

FileMaker 16 introduced a collection of built-in functions for manipulating data serialized as JSON. This makes it easier for FileMaker applications to interact with many web services. This will also make JSON the de facto standard format for scripts within FileMaker to pass parameters and results to each other, improving code sharing within the FileMaker community.
JSON does not have a broad palette of scalar data types to choose from: text, number, boolean, and null. Even with those, FileMaker's JSONGetElement function always returns a text result, even when the serialized JSON value is a number or boolean. So I made a handful of custom functions and scripts for sending and receiving typed data with JSON.
The module is hosted on GitHub, or you can download it directly.

Being unsatisfied with solutions I found on the internet and wanting a solution without plugin I created a set of custom functions that can read a path out of a json-string.
Syntax:
json_path ( json-string ; path )
examples:
json_path( $user_prefs ; "Privileges/Modules" )
json_path( $json_data ; "Menus/Menu[10]/MenuItem[5]/Label" )

View File
read json custom function without plugin, FileMaker only
Being unsatisfied with solutions I found on the internet and wanting a solution without plugin I created a set of custom functions that can read a path out of a json-string.
Syntax:
json_path ( json-string ; path )
examples:
json_path( $user_prefs ; "Privileges/Modules" )
json_path( $json_data ; "Menus/Menu[10]/MenuItem[5]/Label" )
Submitter
macjos
Submitted
09/30/2016
Category
Samples
FM Version
FM Version: 14

I am using a custom function to format a number into currency format ( two decimals ).
RoundDecimals(11.0) = 11.00
The problems occurs when I use a variable:
$amount = 11.0
RoundDecimals($amount) = 11.11
Similarly, I get the same error using a string:
RoundDecimals("11.0") = 11.11
Is there any tricks to get around this issue ?
This is the custom function that I used (I replaced the comma for a dot and defaulted second parameter to 2):
https://www.briandunning.com/cf/974

I am having difficulty removing the .JPG extension from the file name of my imported pictures. The Pictures are actually students pictures saved with the student's ID Numbers.
Example SLT-098-00034.jpg , SLT-088-11123.jpg
I am trying to extract the real ID Numbers from the File names which should be in this format SLT/098/33322
Accomplishment So Far..
Using the Substitute function, Substitute (text; searchstring; replacestring) , I have been able to convert the file name from SLT-098-00034.jpg to SLT/098/00034.jpg
Now, I want to remove the .jpg extension, but can't achieve that using the Substitute function.. Please is there a better way to achieve this?

I was lucky to have gotten an example file, which was based on designing a Subscription system. I think eos was behind it because of the file name. However, the subscription system was based on just three types
1 month, Six Months and 12 Months... I have tried to modify the scripts so that I can have more types like: 1,2,3,4,5,6... Months ( Basically all the months), I end up messing the whole system up. Please what values can I actually modify with respect to the required month I want?
Here is a copy of the file..
LDprototype_subscription_eosMOD.fmp12

I have really tried to figure out this calculation by subtracting the birthday from the current date, I guess that didn't work. I just need to have a countdown to a contacts birthday. Please how do I go about this?

Hi All,
I have written one Custom Function To get the list of Product IDs from the current found set.
Custom Function Name: GetProductIDs
Parameter name : FountCount
GetProductIDs ( FountCount ) =
---------------------------------------------------------------------------------------------------------------------------------------------------------------
If ( FountCount > 0 ;
GetProductIDs( FountCount - 1 ) & If ( FountCount = 1 ; ""; "¶") & GetNthRecord ( Products::Product_ID ; FountCount) ;
""
)
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Note: "Products::Product_ID" this is my product id field from my "Products" table. You can use any field which you want from your current found set.
In the Calculation Field: just write following to get the result of custom function
GetProductIDs ( Get ( FoundCount ) )
Regards,
Trupti
MetaSys Software Pvt. Ltd.
India

Hi I need help in creating a custom function to calculate a salary increases based on the Starting Monthly Salary. Here's my scenario;
I have 2 Tables
Employee --< Employee Pay
The EMPLOYEE table will contain a Field with the Starting Salary; this will be the base value of the employee. Anytime the employee receives an increase, that will be added to the EMPLOYEE PAY table. In our organization, increases can come as a Flat amount or at times a percentage increase. Is it possible to create a Custom Function for this?
What I had in mind was to have a Increase Type field in the Employee Pay table, and depending on the selection. Also, the calculation will be a sequential order by Effective Date of the increase.
I'm a Novice when dealing with complicated Calculations.
Any suggestions?
Thank

hi everyone,
I'm new to filemaker, looking at different video tutorials I've seen the possibility to create custom functions to simplify and optimize the script of my database. in particular it would be useful (not only to me) to create 4 custom functions to control trigger scripts:
triggerAreActive
triggerDisable
triggerEnable
triggerReset
can anyone help me?

Hi all
I think I have this custom function in every database I use.
Case ( Start < Number ;
GetNthRecord ( field ; Start )
& ¶ & AppendNth ( field; Start + 1 ; Number );
Start = Number ;
GetNthRecord ( field ; Start )
)
It is just standard practice for me to use it.
I mostly use it to concatenate data from Portals into a single field for display.
As it only concatenates one field, I usually create a calc of all the fields I want to display and then use
AppendNth ( relate::field ; 1 ; Count ( relate::recid ) )
Is there a better way? It just occurred to me this afternoon, that I just automatically use the FM7 custom function.
Is there an inbuilt function that I have overlooked?
I am sure I could achieve this with ExecuteSQL too.
Thanks in advance.
ZP

Let me first preface this by saying I am by no means an expert on Filemaker, more an enthusiast looking to save my small regional field hockey facility from purchasing an expensive shrink wrapped package.
So...
After searching high and low for a way in which to generate a sports leagues fixture, by using a combination of Custom Functions, Calculations and Scripting. I've also been working on my own to generate something that will get me closer to my goal.
This forum post is VERY close, but I've come up with a few things that make for a little more flexibility. Also, the solution posted by Eos has an issue with calculating the fixtures for a league that has an odd number of teams. That being said some points within this solution have been invaluable in getting my solution to where it currently is, so a very big thanks to Eos for his assistance previously.
Onto my solution... Posted Here
There are two issues at this stage, no doubt more will pop up...
1) The Match List, which utilises a CF called UnorderedPairs found on Brian Dunning's site, is sequential meaning all the 1 | x values are generated first, and then the 2 | x values and so on... Instead the combinations need to come out in a series that allows each team to play only once, and balances the distribution of the fixtures over the time slots available during the season. Home and Away designations DO NOT Matter, since all games are played at a single venue, with the time being the only designation for each round of fixtures.
2) The Loop that creates the fixtures does not carry the previous values forward with the counter, so each round ends up being the same, the script needs to 'remember' the used values and then step forward to the next available value from the match list at the completion of each round.
As an alternative, I have a Python Script that will create the schedule perfectly, but I have no idea how to integrate Python into a Filemaker Solution, so I've moved away from that, but I do still have the Script available should I need it. So if anyone out there is able to help out in that respect, please let me know.
Any and all help is greatly appreciated
Many Thanks

For FileMaker Pro 11 Advanced, I'm looking for a custom function and calculation debugger. This would be like the script debugger, but for custom functions and calculations. Does anyone have a plug-in for this? Or is there another solution? My custom functions and calculations can be very complicated and thus difficult to debug by hand or by printing out intermediate variables.

Last September I wrote an article about a custom function that I optimized to evaluate hundreds times faster. At the end of the article, I challenged my readers and myself by claiming that the already optimized custom function can be optimized even further. Do you remember?
Later on I actually really optimized it again, and talked about this optimization during my session at Pause On Error [x] London 2011. Now you can watch the video of this part of my session below:
Read more and download my updated sample file at honza.24uSoftware.com.

Two weeks ago I wrote an article about a FileMaker custom function I needed to preprocess some data imported from the web. I used this custom function in an auto-enter calculation to immediately preprocess the data while being imported. I created a server-side script that does the import every morning. But when I discovered that the import was taking over an hour every day, I saw it deserves some optimization. I used FM Bench Detective and optimized the custom function to evaluate up to several hundreds times faster…
Read the whole article at honza.24uSoftware.com

I needed to decode HTML encoded text in FileMaker. I thought this must have been done many times before, so I tried to search for a suitable custom function at BrianDunning.com and FMFunctions.com. After checking few functions I found one that seemed pretty good...
Read the whole article at honza.24uSoftware.com

Hi:
I'm a Novice user of Filemaker 11 getting trouble finding a solution to link 2 tables from a set of values located in a Value List.
The first table Products:Product_ID holds the list of products
The second one Products_to_Products is used to show in a portal the products that have the same specs and that can be considered as "similar" or "compatibles".
I need to create the link between this two tables using a Value List.
Example: 4 products has been selected and the value list contains the Product_ID for each one separated by a CR:
myValueList
1
2
3
4
Now, based on this list, I need to create in the table Products_to_Products the records that will hold the pk's for each combination of the members of the Value List.
The only constrain is to avoid the association between same products.
The needed result is this:
Product_ID1,Produc_ID2
1,2
1,3
1,4
2,1
2,3
2,4
3,1
3,2
3,4
4,1
4,2
4,3
There is any Function in Filemaker 11 that will make easy to solve this?
Any help will be greatly appreciated.