Frequently Asked Questions
1. How can I avoid loosing a date previously
typed in a field if I cancel PopCal?
2. Why
do I get a blank date in my date field when I type a date
with PopCal?
3. Why
Filemaker does not recognize the date returned by PopCal as
a Date?
1.
How can I avoid loosing a date previously typed in a field
if I cancel PopCal?
Due to the way they are designed
to interact with Filemaker, Plug-ins have to return parameter,
even if such paramenter is "empty" but they cannot
return "nothing".
Under such scenario, PopCal
was developed to return an empty string if it is cancelled,
causing that a previously typed date in a field be substituted
by a "blank string".
This is not a bug and it is
easily solved within you calling Filemaker script:
Fields:
Temp -- Global field Text
myDate -- The date field you want to put the date in.
Script:
SetField["Temp", "External("POP-DateSelection", 0)"]
If [Temp <> ""]
SetField["myDate", TextToDate(Temp)]
EndIf
2.
Why do I get a blank date in my date field when I type a date
with PopCal?
Usually this happens when your
PopCal preferences have selected a date format different from
the one your Filemaker file or your Operative System has.
Try changing the date format
from dd/mm/yyyy to mm/dd/yyyy or to yyyy/mm/dd according to
the format you need.
This problem usually makes you
to see dates displayed before the 12th day of the month because
days are taken as months.
To verify that the plug works
properly, see the date returned by the plug in a text field.
(Temp field if you use the script above to call the plug).
3.
Why Filemaker does not recognize the date returned by PopCal
as a Date?
Filemaker plug-in API is designed
to send and receive a single string parameter. Therefore,
the string returned by PopCal although looks like a date it
is not a date internally for Filemaker. To make the PopCal
string a valid date, we need to pass the result to the Filemaker
function TextToDate() (see script above).
The result provided by TextToDate()
is a valid Filemaker date that can be used within your Filemaker
files to perform any date calculation or function.