Page 1 of 2

Show Event Details on Calendar (from another file)

PostPosted: Tue Jan 31, 2017 8:27 am
by Jim2001
I have separate file that carries Clients. In this file I have a portal showing client appointments (appointments table is in Dayback file). I want to click a line in the portal in Clients and have the calendar open, move to the correct day view and open that event. I tried to send parameters to the "Show Event Details On Calendar" script but having some trouble formatting/sending the correct variable names. Any pointers would be appreciated.

Re: Show Event Details on Calendar (from another file)

PostPosted: Tue Jan 31, 2017 1:14 pm
by kcembrey
Hi Jim,

Thanks for reaching out regarding this. I'll set up an example and create a short video going over this and post it here later today.

Thanks,

KC

Re: Show Event Details on Calendar (from another file)

PostPosted: Tue Jan 31, 2017 5:26 pm
by kcembrey
Hi Jim,

You can find a quick video showing how to copy the "Show Event Details..." script and modify it to work with your portal here: http://screencast-o-matic.com/watch/cbnVVrQRVs

As I mention in the video, you could pass in the two variables from your portal button instead of hard-coding them in the script if you'd like to use the same script for multiple portals.

Hope that helps!

Regards,

KC

Re: Show Event Details on Calendar (from another file)

PostPosted: Tue Jan 31, 2017 7:25 pm
by Jim2001
That's great. I've noticed however that this works consistently if I'm on the Month view. On the resource schedule with 4 resources showing, I can only get the first event to change the date. After that the calendar date won't change. Same with week and day views. No reaction from the calendar. Having this work in Week Sched mode is most important to me.

Re: Show Event Details on Calendar (from another file)

PostPosted: Wed Feb 01, 2017 10:44 am
by Jim2001
I just tried it again this morning and suddenly it does indeed work in Week Sched mode. Not sure why it failed initially. :?

Re: Show Event Details on Calendar (from another file)

PostPosted: Wed Feb 01, 2017 10:54 am
by kcembrey
Hi Jim,

Great to hear that it's working now. Let us know if you see that behavior again with week view and we'll see what might be going on.

Regards,

KC

Re: Show Event Details on Calendar (from another file)

PostPosted: Fri Jan 19, 2018 1:03 pm
by Jim2001
I need to look at the screen cast you put up regarding this and noticed that it's missing. Can you repost it?

I can't seem to get this to work on another calendar.

Re: Show Event Details on Calendar (from another file)

PostPosted: Fri Jan 19, 2018 2:03 pm
by John Sindelar
Hi Jim,

Here's how I'd do this: https://seedcodevideos.s3.amazonaws.com ... f8tui4.mp4

Hope that helps,

John

Re: Show Event Details on Calendar (from another file)

PostPosted: Fri Jan 19, 2018 2:20 pm
by Jim2001
Thanks John. I was using the wrong scripts. I seem to be having an issue with this. When I click my link (in the other contacts file) nothing opens. It doesn't flip to the correct week or month and doesn't open the event. It does bring the calendar forward though.

Re: Show Event Details on Calendar (from another file)

PostPosted: Fri Jan 19, 2018 2:30 pm
by John Sindelar
I'm sorry, Jim! I forgot that this script kind of needs to run in the context of the event. Stay tuned and we'll post details.

Re: Show Event Details on Calendar (from another file)

PostPosted: Fri Jan 19, 2018 2:31 pm
by Jim2001
Additionally, I noticed that the exact same coding doen from the Sample Contacts works just fine but if I try it from a saparate file. It doesn't work at all. Curious...

Re: Show Event Details on Calendar (from another file)

PostPosted: Mon Jan 22, 2018 11:04 am
by Jim2001
Also in relation to this, I noticed the script called "Show Event Details On Calendar (SourceNo ; FocusDate)" has a trap in it for Filemaker Go stating that this script is not supported. Is there really no way to make that work?

Re: Show Event Details on Calendar (from another file)

PostPosted: Mon Jan 22, 2018 3:09 pm
by kcembrey
Hi Jim,

We're still looking into the best way to accomplish this from a separate file so we can get it into our documentation. I'll check in with John to see if he has details on the FMGo compatibility issue. We'll reach out with more details.

Thanks,

KC

Re: Show Event Details on Calendar (from another file)

PostPosted: Fri Jan 26, 2018 5:36 pm
by kcembrey
Hi Jim,

I've added a new section to our Navigation docs which shows how to modify the "Show Event Details On Calendar..." script to allow passing the additional parameter $sc_EventID when navigating from outside the context of the event record. Once you've applied the changes to the script, you can set up your button to run this script in the DayBack file and pass the $sc_SourceNo and $sc_EventID parameters to load the calendar showing that specific event.

When we tested this in the past on FMGo, we had undesirable results. I commented out those lines and tested on a new iPad running FMGo 16 and it seems to be working as expected. If you're running FMGo 16 on your devices, it might be worth a shot. Just be aware that you might run into unexpected results.

I hope that helps!

KC

Re: Show Event Details on Calendar (from another file)

PostPosted: Tue Feb 06, 2018 9:12 am
by Jim2001
Hi Guys. I put in the code for the jump from anther file and it more or less works but I've noticed an issue. If you close the calendar file (accidentally or on purpose with the red window close button), it opens on it's own but hidden (this is OK). But when I click my go to related record button in the separate contacts file (to jump to any event) I get the "Invalid Date" message.

I am passing the following parameters in the GTRR script sent to the calendar:

#("sc_FocusDate" ; $startdate) &
#("sc_SourceNo" ; 1) &
#("sc_EventID" ; $eventid)

--Update--
I noticed that the Upon Startup script didn't run when the calendar opened hidden. I added a script step to select the calendar window ahead of the GTRR. That opened the correct event, but the Invalid Date message still shows.