Version
Function
This function returns
the version number of the plug-in. A must function in
every Filemaker plug-in, which provides a simply method
to check plug availability for validation purposes.
It provides a safe way to avoid any problem in your
application if someone removes the plug-in from the
proper folder.
GetNumRange
Function
This function generates
traditional Ranges between a start and end numbers without
the calendar interface.
The range of numbers created
by this function are mainly oriented to be used with
date ranges, although this function can be used for
any range of numbers. When dealing with amounts or large
numbers in general we recommend using the GetSmartNumRange
function because its capability to deal with numbers
up to 9 digits and the SmartRanges capability to avoid
the 64K limit of the text fields.
As we said above, Filemaker
stores dates as sequential numbers, being January 1
st. 0001 number 1 and December 31st. 3000 number 1,095,727,
therefore any range of dates can be created with this
function.
Whatsoever, this function
is limited by the 64K size of the FileMaker text fields.
The overflow message is:
“Type a smaller range” which can easily be trapped within
FileMaker to display to your users the message you like.
You only need to include the following Scripts in FileMaker.
If (External("Dafr-GetSmartNumRange",
"|StartNum=" & StartNumVariable & "|EndNum="& EndNumVariable)
= “Type a smaller range”, ShowMessage...
In the same way as previous
functions, if you provide a prefix and/or a suffix to
append to the returned range, they both will be concatenated
to the begining and to the end of each number returned
by the function respectively. Although most of the DataFilter
1.1 functions are used with the FileMaker function “SetField”,
GetNumRange function can also be used in a calculation
field, allowing a continuos calculation of the multi-key
range for any start and end numbers given.
This is possible because
the GetNumRange function does not use the Graphical
Interface (GUI).
NOTE: Do not
use any GUI function in a calculation field.
Examples:
Using the function from
a script in FileMaker:
SetField[MyField, External(“Dafr-GetNumRange”, parameter)]
(After the user triggers this script in the way you
choose, the result is put into the variable MyField.)
Using the function in
a calculation field:
If(IsEmpty(StartNumExample) or IsEmpty(EndNumExample),
"",
External("Dafr-GetNumRange", "|StartNum=" & StartNumVariable
& "|EndNum=" & EndNumVariable))
In a calculation field,
the result is re-calculated immediately when there is
any change in the parameters.
If you pass StartNum=730577
and EndNum=730582, you will get :
730577
730578
730579
730580
730581
730582
730583 |
As you can see the numbers
returned are only a sequential range of numbers between
the start and end numbers.
The numbers above are
the FileMaker number equivalents for the dates from
2-April- 2001 to 7-April-2001.
In the same way, if StartNum=1000
and EndNum=10000 are passed to the function it will
create a sequential range of numbers from 1000 to 10000.
As before, a prefix and/or a suffix can be added to
this function creating ranges like this below:
Prefix730577Suffix
Prefix730578Suffix
Prefix730579Suffix
... |
SmartKey
The SmartKey function
will give you the capability to implement SMART Ranges
in a couple of minutes instead of hours if you programm
them directly within FileMaker.
Even more, with the SmartKey
function, you won’t need to get into the complexities
of SMART Ranges, you won’t even need to understand how
they really work.
According to the SMART
Ranges technique, to achieve what we called a “compression
of dates” if you need to select numbers from 1357(00)
to 1357(99) only the number 1357 will be created to
select the whole one hundred numbers, but on the right
side of the relationship, to have a relationship match,
you need to create a list, separated by returns, for
each of the categories that you number belongs to.
For example, if you have
a number: 135763 To find such number with SMART Ranges,
you need to have the numbers for each of the categories
it belongs (tens, hundreds, thousands, etc.).
Therefore you need to
have such number in this form:
135763
13576
1357
135
13
1 |
This means that if a SMART
Range is created to select numbers from 1357(00) to
1357(99), as we explained above, only the number 1357
will be created by the SMART Ranges function but on
the right side, the SmartKey function will provide all
the categories from which this number can make a match.
Example:
External("Dafr-SmartKey",
"|StartNum="& Date &"|Suffix=" & Status & "|Prefix="
& Company)
The SmartKey function
also simplifies the addition of a Prefix and a Suffix.
Another important feature
of the SmartKey function is the capability to automatically
create the number of positions of the number passed
in the StartNum parameter.
This means if you have
and three digit number in StartNum, you will get three
digit number function, but if you pass a four digit
number you will get four digit numbers.
For example: 0546 Will
return:
But if you pass a number
like 134567 You will get
134567
13456
1345
134
13
1 |
This mean that numbers
won’t be forced to have seven digits or more, which
is vital for the SMART Ranges technique.
VERY IMPORTANT: The SMART
Ranges technique works with positions, so you need to
have the same number of digits on both sides of the
relationship.
Therefore if you are dealing
with, let’s say, 7 digits for dates and your right side
number is only three digits, you need to stuff some
zeroes to make the relationship work.
Fourtunately, the SmartKey
function has another parameter SmartSize, which will
allow you to set the number of positions that will be
used by the SmartKey function.
Example: External("Dafr-SmartKey",
"|StartNum=7865|SmartSize=6|Prefix=Yes_”)
Will return:
Yes_007865
Yes_00786
Yes_0078
Yes_007
Yes_00
Yes_0 |
This parameter is esencial
to have smart ranges working because it puts all the
records on the same size and if the same SmartSize function
is also used with the same parameter on the left side
of the relationship in the function GetSmartNumRange,
then the matching is guaranteed.
DataFilter
Options
DataFilter has a huge range of options
which can be easily configured through:
- DataFilter Wizard.
- DataFilter Studio.
- DataFilter Preferences.
Although DataFilter has many options,
they are very easy to configure. Either dynamically
with FileMaker scripts or statically through the plug-in
preferences.
DataFilter options and capabilities
are provided to give developers a wider range of options
to fulfill the needs of their applications.
Interface
- Single & Dual calendars.
DataFilter displays
single calendar for date selection and dual calendars
for range selection.

Size
DataFilter 1.0 can display the single calendar and the
dual calendars in three different sizes: Small, Medium
and Large.

Position.
Calendars can be displayed anywhere on the screen.

Kind
DataFilter 1.0 has two different interfaces to navigate
in the calendars. Menus or buttons.

Behavior
Calendars can be closed automatically
or with confirmation buttons.

First day of the week
Calendars in DataFilter can be displayed
showing the monthly calendar with the weeks starting
on Sunday or Monday.

Error display
When the user fails to pick a date, you can get an error
display or get an error result back so it can be trapped
and your own custom message can be created within Filemaker.

Message displayed by DataFilter.

Error returned by DataFilter.
Languages
DataFilter 1.0 can show calendars with
months in seven different languages:

Date Format
DataFilter can return picked date in
three different formats with any date separator (slash,
dot, underscore, hypen, etc.).
Formats and date separators can be
changed dynamically in your code, allowing you to use
DataFilter in worldwide applications.

Start & End Dates
DataFilter 1.0 allow you to set a date
to display the calendars, even more, for the RangeSelection
function, you can set a start date and an end date one
to display each of the calendars.

Date Separator
You can set any date separator (/ -
_ . + : ).

Title
DataFilter allow you to set the calendar
window title.

|