Page 1 of 1

"don't show on calendar" not working

PostPosted: Thu May 26, 2016 3:40 pm
by denismailloux
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

Re: "don't show on calendar" not working

PostPosted: Fri May 27, 2016 5:13 am
by DanW
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,

Re: "don't show on calendar" not working

PostPosted: Tue May 31, 2016 7:25 am
by denismailloux
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

Re: "don't show on calendar" not working

PostPosted: Tue May 31, 2016 11:32 am
by DanW
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,