Hide an event based on an event field

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 109
Joined: Fri Jul 17, 2009 7:44 am
PostPosted: Mon Nov 08, 2021 4:33 pm
I thought I knew how to achieve this, but I want to have an event hide on the calendar based on an entry in an event field. Can you point me in the right direction? :roll:
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Tue Nov 09, 2021 9:42 am
Hi Jim,

We have some documentation here which describes how to modify the Event Find script to hard-code a filter based on any criteria that you'd like in the event: https://www.seedcode.com/pmwiki/index.p ... eeMyEvents

Another way to do this would be to just have the start date in the "DBk_WebViewerSource" calculation return an empty value based on your special event field. If there's no start date in this calculation, it won't show on the calendar.

I hope that helps! Let us know if you have any further questions.

KC
Posts: 109
Joined: Fri Jul 17, 2009 7:44 am
PostPosted: Wed Nov 17, 2021 12:56 pm
Thanks KC. I set up an 'IF' statement around the "DBk_WebViewerSource" that looks for the event field I made that toggles visibility (a text field with a dropdown). When I enter the event and change this field to hide and save and close the event, it hides just fine. However if I click the refresh or do anything to change the date being viewed it becomes visible again. Any thoughts?

There is just one thing: I have a global variable ($$hideOption) that sets within the calendar file that is used in the IF statement. Now that I look at this it may be that variable is not staying set. Checking...
Last edited by Jim2001 on Wed Nov 17, 2021 1:18 pm, edited 1 time in total.
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Wed Nov 17, 2021 1:17 pm
Hi Jim,

Somehow, when DayBack queries the data, the DBk_WebViewerSource calculation is coming back with data, rather than returning an empty string. This could possibly have to do with PSOS.

Are you relying on a global variable to determine whether or not to show the event? If so, keep in mind that PSOS runs in an entirely different session, so that variable won't exist in the PSOS session when the data is queried.

You could instead use a field that isn't stored globally, then it will be unique per record.

Regards,

KC
Posts: 109
Joined: Fri Jul 17, 2009 7:44 am
PostPosted: Wed Nov 17, 2021 1:20 pm
I think you are correct. The global variable is the issue. I forgot about PSOS.

Return to DayBack Calendar for FileMaker

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: