Brian Dunning's FileMaker Custom Functions

FindNewTimestampedValues ( data ; searchFromDate ; searchUntilDate ; searchFromTime ; delimiter )

Pull newer values from order lists of timestamped values.

  Average rating: 4.5 (20 votes) Log in to vote

Richard Dyce   Richard Dyce - Show more from this author
Dyce & Sons Ltd.
http://dyce.com

Share on Facebook Share on Twitter

  Sample input:
$$test ="25.02.2016 10:32:21 Fu
25.02.2016 09:32:16 Bar
24.02.2016 10:32:13 Double-bar
24.02.2016 09:32:10 Mungo
23.02.2016 09:32:04 Midge
22.02.2016 10:14:40 Bingo
22.02.2016 10:14:40 Fluffy
21.02.2016 10:14:40 Bongo
21.02.2016 10:14:40 Flump"

FindNewTimestampedValues ( $$test ; GetAsDate( "23.02.2016" ) ; Get( CurrentDate ) ; "9:45" ; " " )
  Sample output:
25.02.2016 10:32:21 Fu
25.02.2016 09:32:16 Bar
24.02.2016 10:32:13 Double-bar
24.02.2016 09:32:10 Mungo

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function pulls data from a timestamped list of values (e.g. an audit log), sorted newest first. In other words it either pulls just the first x values from the list that were timestamped AFTER searchFromDate, searchFromTime, or returns ""

Parameters:

data : A timestamped list of values, e.g. "timestamp details¶timestamp details¶timestamp details"
searchFromDate : which date to you want to search from?
searchUntilDate : at what date should you give up searching the list?
searchFromTime : at what time on the first date to start searching?
delimiter: this should probably be a space, but you may have a tab-delimited "date, time, details"-stylelist of values.

 

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: