"don't show on calendar" not working

Notes on the new SeedCode Complete template for FileMaker 13
Posts: 21
Joined: Tue Dec 08, 2015 12:38 pm
PostPosted: Thu May 26, 2016 3:40 pm
Hello!

I turn on this check box for one of my event and the event is stil showed in the calendar. From the documentation, the event should be showed only in the Gantt chart. I tried it with your demo and it has the same behaviour. Help please!

Denis
SeedCode Staff
SeedCode Staff
Posts: 190
Joined: Tue Sep 22, 2015 2:27 pm
PostPosted: Fri May 27, 2016 5:13 am
Hi Denis,

Thanks for reaching out here on this. There is an easy fix!

You can filter out these marked events by adding one script step to calendar file's "Event Find" script. Around line 63, there is a comment for 'Hard code any "hidden" filters here'. Under the first If for source number 1, add the Set Field step as shown in the screenshot. This will cause any Events that are marked "Do not show on calendar" to be filtered out! Let me know if that works for you.

Thanks again,
Attachments
Screen Shot 2016-02-16 at 11.11.51 AM.png
Screen Shot 2016-02-16 at 11.11.51 AM.png (303.78 KiB) Viewed 13543 times
Posts: 21
Joined: Tue Dec 08, 2015 12:38 pm
PostPosted: Tue May 31, 2016 7:25 am
Hi Dan,

Thanks for your answer. The "Event Find" function is actually the right place. I realize I asked you the same question (sorry  :oops: ) before and I see I made a similar change in this file. In fact I used the more general instruction Set Field By Name [ $$sc_SourceTableOccurrenceName[$sc_sourceNo] & "::z_DontShowOnCalendar"; "=" ] in order to catch any sources. At that time it was certainly working but now it doesn't. What is the difference? With the help of  your answer, I realized the difference is FMP vs FMS. Now because my solution is stored on FMS, the "Event Find" function is executed on the server thru PSOS. Unfortunately it breaks my single line of code because the global variable $$sc_SourceTableOccurrenceName is not set on the server. PSOS is quite new for me and I must take care of some behaviour like this one. Your last solution not relying on global variables is better and works well.

Thanks again,

Denis
SeedCode Staff
SeedCode Staff
Posts: 190
Joined: Tue Sep 22, 2015 2:27 pm
PostPosted: Tue May 31, 2016 11:32 am
Hi Denis,

Thanks for letting me know! Glad you were able to get this working again -- nice troubleshooting.

I would expect that you could still abstract this if you wanted (although it's not really necessary). You could try $sc_Table & "::z_DontShowOnCalendar" for your abstracted Set Field by Name step. That should work for you, but again not necessary at all.

All the best,

Return to SeedCode Complete 13

Who is online

Users browsing this forum: No registered users and 3 guests

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