Page 1 of 1

New Event problem - "?" in date field

PostPosted: Tue Aug 14, 2018 12:03 pm
by jimrecht
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

Re: New Event problem - "?" in date field

PostPosted: Tue Aug 14, 2018 2:27 pm
by kcembrey
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

Re: New Event problem - "?" in date field

PostPosted: Tue Aug 14, 2018 4:04 pm
by jimrecht
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!

Re: New Event problem - "?" in date field

PostPosted: Tue Aug 14, 2018 4:05 pm
by jimrecht
Here (attached) are the screenshots showing the called script and the relevant calculation.

Re: New Event problem - "?" in date field

PostPosted: Wed Aug 15, 2018 9:38 am
by kcembrey
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

Re: New Event problem - "?" in date field

PostPosted: Wed Aug 15, 2018 1:54 pm
by jimrecht
thank you! i emailed the files per your instructions.

jim

Re: New Event problem - "?" in date field

PostPosted: Wed Aug 15, 2018 1:59 pm
by kcembrey
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

Re: New Event problem - "?" in date field

PostPosted: Thu Aug 16, 2018 2:37 pm
by jimrecht
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

Re: New Event problem - "?" in date field

PostPosted: Thu Aug 16, 2018 3:16 pm
by kcembrey
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