Hide an event based on an event field
5 posts
• Page 1 of 1
Posts: 109
Joined: Fri Jul 17, 2009 7:44 am |
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?
|
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 |
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.
|
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 |
I think you are correct. The global variable is the issue. I forgot about PSOS.
|
5 posts
• Page 1 of 1
Return to DayBack Calendar for FileMaker
Who is online
Users browsing this forum: Google [Bot] and 4 guests