New Event problem - "?" in date field

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Tue Aug 14, 2018 12:03 pm
Hi All:

Since updating from 10.26 to 10.31 this week, we see a new problem when we attempt to create new events by clicking directly on the calendar. Please note that our DayBack is linked to our data via a "linking" integration. See attached screenshot. The mini window displays a "?" in the date field. It should display the currently selected date.

Any help appreciated!

Jim
Attachments
new-event-error-1.png
new-event-error-1.png (222.09 KiB) Viewed 14094 times
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Tue Aug 14, 2018 2:27 pm
Hi Jim,

The window name should be populated with the event start date, which is passed in on line 27 of the "Show Event Details From WebViewer" script using the "$start" parameter.

Most likely, the is that the DBk_WebViewerSource field in your event table has an invalid value assigned to the "sc_startDate" or "sc_StartTime" variable. Verify that you have the correct fields assigned to those values in the DBk_WebViewerSource field. (These should match the variables on your "Source No X" layout.

Let us know if that helps!

KC
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Tue Aug 14, 2018 4:04 pm
Hi KC and all:

It looks to me like I have the correct fields assigned. Please see the additional screenshots I have attached here.

We have modified the "Show Event Details From WebViewer" script, because we need to call a script in the linked database file. So our modified script does not pass the variable you note at Line 27. We do not call the "Draw New Event Window" script. See the respective screenshots.

Also, we have modified the "Create Edit Delete Event" script. See screenshot of that script.

As you can see, we call the "New Calendar Event" script in the linked file. See screenshot of that script. Could the problem be here? See the screenshot of the calculation.

We haven't changed any of the scripts in the linked file. So I think the problem has to do with parameters that are passed to the linked file.

I really don't know what I'm doing here :( and could use your help.

Also -- I need to post once more, because I have two more screenshots to upload.

Please advise. Thanks again!
Attachments
create edit delete event.png
create edit delete event.png (133.07 KiB) Viewed 14079 times
source no 1.png
source no 1.png (227.11 KiB) Viewed 14079 times
Show Event from 1.png
Show Event from 1.png (141.33 KiB) Viewed 14079 times
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Tue Aug 14, 2018 4:05 pm
Here (attached) are the screenshots showing the called script and the relevant calculation.
Attachments
calculation.png
calculation.png (24.92 KiB) Viewed 14079 times
new calendar event in linked file.png
new calendar event in linked file.png (66.39 KiB) Viewed 14079 times
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Wed Aug 15, 2018 9:38 am
Hi Jim,

Since you're not running our "Draw New Event Window ( Name )" script, you'll need to name the window accordingly in another script. I'm guessing you're doing this in your "Jump to Event in my Layout (EventID)" script, but the value you're passing to name that window is not valid.

This is something that would be best to step through the debugger until you get to the point in your scripts where the new window is created and named and see what the values/parameters passed to the window name are evaluating as.

I'd be happy to take a quick look at your files on my end to try and troubleshoot this. If your files zip down to under 15 MB, you can email them to [email protected]. If they're larger than that, please use this free service: https://wetransfer.com. Be sure to include your full-access account name and password either in a text file or in the email.

Thanks!

KC
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Wed Aug 15, 2018 1:54 pm
thank you! i emailed the files per your instructions.

jim
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Wed Aug 15, 2018 1:59 pm
Hi Jim,

Thanks for sending over the files.

The "CalendarRows::DateFocusGlob" value doesn't evaluate to anything at the time the "New Calendar Event" script is run. This is why the date shows as "?" in the window name.

You could either use your "$$CalCurrentDate" global variable to pass in the date, if that's being maintained, or you could pass in just "$sc_DateStart" as the parameter when you call the "New Calendar Event" script and then pass "Get ( ScriptParameter )" to the "Create Edit Delete Event..." script in your file to forward the event date into the script.

Let me know if that helps!

KC
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Thu Aug 16, 2018 2:37 pm
Hi KC:

1. $$CalCurrentDate is only going to work if we happen to be looking at today's date, correct? But the whole point of the "click for new event" function is the ability to quickly create a new event on the date currently showing in the calendar -- am I missing something?

2. So I opted for your second set of instructions (passing $sc_DateStart to the "New Calendar Event" script, and "Get ( ScriptParameter )" to the "Create Edit Delete Event..." script).

3. And that does the trick nicely. Thank you so much!

:D
Jim
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Thu Aug 16, 2018 3:16 pm
Great to hear that worked for you, Jim.

A note on the $$CalCurrentDate variable. That's actually not a DayBack global, so I'm not sure where it is set in your file, it just seemed to match the date that the new event was being created on. You're probably best using the date that is passed into the script from the event itself.

Regards,

KC

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: