When does script 'Event Find' run?

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 7
Joined: Thu Oct 06, 2016 5:48 am
PostPosted: Fri Oct 07, 2016 6:02 am
I'm looking to selectively Hide ToDo items and have modified the Event Find script to meet my needs; however, I'm noting that this script does not get called by the Load Calendar Layout script (chain)

FYI the Notes comment for this script does not include the calling conditions.

Thanks!
Colleen
SeedCode Staff
SeedCode Staff
Posts: 98
Joined: Mon Aug 13, 2012 7:43 am
PostPosted: Fri Oct 07, 2016 7:42 am
Hi Colleen,
DayBack uses a webviewer for the calendar interface. So most scripts will be called from the webviewer. That means you might not necessarily see exactly where some scripts are called from. In this case when the webviewer loads the calendar (triggered from the "Load Calendar Layout" script) the webviewer launches the FileMaker script "Query Events From WebViewer". That script then calls "Insert Events Into Calendar" which in turn calls the "Event Find" script.

It can be helpful to turn on the script debugger to see what scripts are called when to get a better picture of the loading process if you have FileMaker Advance. That being said the "Event Find" script will run any time events need to be fetched from the database. So when the calendar loads, when navigating dates etc. The "Event Find" script also might be running as a PSOS script running on the server if you have the file hosted on an FM server. So if that is the case the script contents wouldn't show up in the script debugger.

I may need more clarification on what you mean by calling conditions but if you mean that we don't have when the script gets called that is by design. Scripts get called from many different places and it would be challenging to maintain script notes for each context possible. We maintain a list of parameters passed into the script. In this case because the script runs server side if the file is hosted on a server those parameters are global vars.

Sounds like you are on the right track to get the calendar hiding the ToDo items how you want it. Let us know if you have any other questions.

Hope that helps,

--
Tanner Ellen
[email protected]
tel. (855) 733-3263
http://www.seedcode.com
SeedCode: Start Making Software
Posts: 7
Joined: Thu Oct 06, 2016 5:48 am
PostPosted: Fri Oct 07, 2016 8:32 am
When I view the Script: 'Load Calendar Layout' I see the following Perform Script steps:

Halt Layout Based Script Triggers
Clear Webviewer
Set Webviewer ({Message})
---------------------------------

I have stepped through the entire sequence with debugger; and Event Find is not getting called..thus my question.

This script states it is Version: 9.47 FBz 33432, 8.77, 6.18, FBz 14996

Is there an update I should be applying?

Thanks,
Colleen
SeedCode Staff
SeedCode Staff
Posts: 98
Joined: Mon Aug 13, 2012 7:43 am
PostPosted: Fri Oct 07, 2016 8:54 am
Looks like the version string you are referring to is for the script "Load Calendar Layout". Yes there has been an update since then but you will need to update the whole calendar not just that script.

To see which version you currently have navigate to the "Settings" tab in the sidebar, then click "Account Settings". Note the version that is being reported. Then you can see the version history here:

http://www.seedcode.com/pmwiki/index.ph ... ionHistory

Depending on which version you have currently there may need to be some FileMaker script changes applied. You will need to look at every version between the one you have and the latest version to see the instructions for applying all of those changes. A lot of our changes are just to the javascript code and those get updated automatically when you click "Check for Updates" and then "Install Updates". Unfortunately some changes are required in the FileMaker file itself and those will have to be made manually per the instructions in the version history page.

If you are having issues with scripts not firing from the webviewer we actually made a simple troubleshooting tool to check if the FMP script url protocol is working on your computer. Download the attached file, unzip it, then open it and click the big "Click Me" link. If you get a dialog that said it worked then the url protocol is working. If not dialog comes up then it is not working and you should take a look at our troubleshooting page to help resolve the issue.

http://www.seedcode.com/pmwiki/index.ph ... leshooting

FMP URL Tester.fmp12.zip
(65.6 KiB) Downloaded 998 times


Hope that helps,

--
Tanner Ellen
[email protected]
tel. (855) 733-3263
http://www.seedcode.com
SeedCode: Start Making Software
Posts: 7
Joined: Thu Oct 06, 2016 5:48 am
PostPosted: Fri Oct 07, 2016 2:44 pm
Thanks for the explanations!

I found the problem. The find criteria I hard coded referenced both a global toggle (that 'managers' can make) as well as the AccountName.

So, when I changed the configuration to NOT PSOS the hard coded filters work; and fail when PSOS is enabled.

Guess I'll have to add some parameters instead.

-Colleen

Return to DayBack Calendar for FileMaker

Who is online

Users browsing this forum: No registered users and 2 guests

(855) SEEDCODE
[email protected]
Follow us: