Tooltips stop working

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Tue Dec 18, 2018 7:03 am
I don't know where I lost it in my implementation (started with 10.41), but the tooltips is not working.
I don't even see the hand on event hover. I updated my application to 10.45.

I tested on a fresh 10.42 (source 1) and it's working, I setup the script load source as per example and the tooltips work as expected. I then open the 10.44 file, updated to 10.45 and copy the script line from 10.42 into 10.45... and the tooltips is not working, but I see the hand on event hover, but nothing shows up.

I downloaded a fresh copy of 10.45 and it's working :cry: :?:

I emptied the user\local\temp folder, restart, same results.

Where did I go wrong ?? Since this is done in a world I know nothing about, I can't trouble shoot with the debugger !

Thanks
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Dec 18, 2018 7:52 am
This can be frustrating to work with since FileMaker can't tell us if the JS is right or not. And, as you say, there's no script debugger. It's a lot of trial and error. But it's also kind of fun... at least once it starts working. =)

If I'm reading your post correctly, it sounds like you can paste your JS tooltip into a new download of 10.45 and it works correctly, but if you add the same line to your file which has been updated to 10.45, it doesn't work. Do I have that right?

If so, two things to try:

1. There was a FileMaker script change required in 10.44 that you may have missed. I'd revisit the instructions for that update here and confirm that you made all the correct changes: https://www.seedcode.com/pmwiki/index.p ... ionHistory

2. If your JS has commas in the code, try testing with one that doesn't: see if a simpler tooltip like "javascript:dbk.tooltip(event.title);" works in one and not the other.

Let us know what you find,

- John
John Sindelar
SeedCode
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Tue Dec 18, 2018 7:50 pm
Thanks John,

I retrace the modifications since 10.42, everything was done as indicated.

I tried to disable the script line and copy the original from 10.45, same result.

on the 10.45 with or without coma it work, on mine, no change.

I also tried to replaced both web-calendar.js/css just in case... still not working.

As I mentionned, the cursor hand is not showing in the web viewer... It work at some point because when I configure it the 1st time it work.

Any other ideas ?
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Dec 19, 2018 7:24 am
Thanks for the details!

Copying and pasting from a working copy to yours should definitely work if all the intervening updates were made. Normally I'd suggest you might be pasting in some stray characters, but that would probably raise an error in DayDack instead of just doing nothing. We should probably take a look at your file. I'll email some next steps.
John Sindelar
SeedCode
SeedCode Staff
SeedCode Staff
Posts: 17
Joined: Tue Dec 04, 2018 10:21 am
PostPosted: Wed Dec 19, 2018 1:08 pm
Hi Jean-Francois,

Thank you for sending over the file. We just need to add the Event Actions to your "Load Source Settings at Startup --- Describe Your Sources Here ---" script. We have some documentation here: https://www.seedcode.com/pmwiki/index.p ... entActions

Please see the below screenshot for an example of the changes you need to make. You make these changes on line #39 and line #84.

Screen Shot 2018-12-19 at 13.06.12.png
Screen Shot 2018-12-19 at 13.06.12.png (234.35 KiB) Viewed 901524 times


Let us know if that helps.

Best wishes,
Ana
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Wed Dec 19, 2018 4:43 pm
Boy I feel so stupid !!

I typed exactly like the picture in the link you gave me... the only thing I didn't get was the last line of code

"[editable]" ... my calendar is readonly that is why it was not showing up... it was editable then I switch it back to readonly because of the status conflic that I need to fix when I was moving an event in the calendar... that is why it was working before and it stop working after !!

The only thing now is why the little hand is not showing up ??

In Horizon view it is on the text, not the color rectangle to le left. But it shows in between rectangle's lines.
Day/week/month view... no hand icon.

Thanks again for your help
SeedCode Staff
SeedCode Staff
Posts: 17
Joined: Tue Dec 04, 2018 10:21 am
PostPosted: Thu Dec 20, 2018 1:23 pm
Thank you for letting us know Jean-Francois. We are seeing the same behavior for Read-Only events on the calendar. I'll check on this and let you know.
SeedCode Staff
SeedCode Staff
Posts: 17
Joined: Tue Dec 04, 2018 10:21 am
PostPosted: Thu Dec 20, 2018 1:26 pm
And you shouldn't feel stupid. We look at this code every day and make similar errors all the time!!!
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Fri Dec 21, 2018 6:44 am
Hi Jean-Francois,

It turns out this cursor behavior is unrelated to the new Hover event and is a small bug having to do with Read-Only calendars, so thank you for bringing this to our attention.

I believe the original intention was to hide the pointer cursor (the hand) on read-only calendars to indicate that the events were not draggable, and the cursor showing on the text in horizon view was unintentional. I've made a case to make this behavior consistent and since the events are clickable in Read-Only, I think the appropriate behavior is to always show the pointer/hand, even for read-only calendars.

This will be addressed in an upcoming version, so stay tuned for that.

Thanks Again!
-Jason
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Wed Nov 27, 2019 4:38 pm
Hi,

This is an old one, but I need to change the Tooltips info that is displayed... and I'm reading all the documentation and I can't figure out how to add more data to it.

Where or how/where do you assign event.title to a field or calculation or any of the other event.xxx.

Now I'm using event.description but I need to add a FM field before, so I use (both way) has shown in the document
https://seedcode.com/pmwiki/index.php?n=DayBackForFileMaker.Tooltips
Image

"java script: dbk.tooltip('[[FM_FIELD]]' + event.description)" ;
Java Script in 2 word is because I get block if I try posting the full word !!

And I have FM_FIELD textually showing up in my tooltip.

Under the hood I see my field association, but no relation to coding like event.xxxxx

and the page additional fields
http://seedcode.com/pmwiki/index.php?n=DayBackForFileMaker.AdditionalFields
is for the used of the default popover click on event.

One last thing, the field that I need to add is a related record, not in the event table.

Thanks
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Thu Nov 28, 2019 1:57 pm
Hi Jean-Francois,

Thanks for asking about this.

Any field referenced in the tool tip needs to be mapped into DayBack as a regular field (like Date Start) or as an additional field. Otherwise DayBack won't know to query FileMaker for the field. Once DayBack "has" the field in its field mapping, it can be used in the tooltip.

And all fields referenced in field mapping need to be local to the table being shown: you can't map related field.

An alternate approach is to create a tool-tip field in your FileMaker record, format that as you'd like with as much CSS as you need and any references to related fields. Then map that as an additional field and use it as your tooltip.

I hope that helps,

John
John Sindelar
SeedCode
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Wed Jan 08, 2020 1:00 pm
Thanks John,

I tried today to change it and still I can't get it to work.

As I said earlier, either way, this is not working
[['FM_FieldName']] or '[[FM_FieldName]]'
Image

and using [[FM_FieldName]] or just plain without bracket FM_FieldName will give me on the popover a message Syntax error

I get it that we can't use related data, so I created a field with a calculation of what I wanted and I would like to insert it... but the syntax is wrong.

On the other and, I tried to use the mapping layout and use summary and map it to my calculation field.
The move event on the calendar won't work, can't modify a calculation field, anyway it's not working either.

In the script calculation this is what I have.

Image

I tried to use the "token" field to change the event.description to event.titleEdit to get the mapped field with summary... nothing show on the popover... I'm assuming this is the correct list of token you can add in the Java event.(token) ??

Image

event.titleEdit doesn't work, I tested other token and they work ?!? So maybe it's a typo on the help page ?

Either way, inserting a field syntax I don't get or a wrong syntax token ?

Thanks
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Wed Jan 08, 2020 1:39 pm
Hi Jean-Francois,

As John mentioned, you won't be able to reference a FileMaker field directly in an event action unless it is an additional field (or one of the built-in fields like summary, description, etc.). The action is saved to that calendar source as a template, based on the context of the event in the calendar (not the actual FileMaker record). So the event actions need to reference only properties of the event object.

So, you'll first need to setup your "A_CR0107" field as an additional field on that calendar source: https://www.seedcode.com/pmwiki/index.p ... onalFields

Only when it is set up as an additional field will that field's value be a property of the event object, and can then be referenced in an event action.


On your second note, the issue you're seeing is when trying to save changes back to a record. Since the field is calculated, you'll see a 201 error because FileMaker can't save back to a calculated field. To account for this on an additional field, you can add an If statement to your "Create Edit Delete Event..." script that prevents the script from trying to write back to that additional field. As shown in this screenshot

AdditionalCalculatedField.png
Additional Calculated Field
AdditionalCalculatedField.png (482.05 KiB) Viewed 899732 times


If you instead want to use the summary field, you would need to wrap the section commented "#Summary" in the same script in an If statement to prevent it from trying to save back to your calculated field when $sc_SourceNo equals the source you're applying the tooltip to.

Let me know if that helps!

KC
Posts: 58
Joined: Thu Nov 29, 2018 4:56 pm
PostPosted: Wed Jan 08, 2020 2:23 pm
#1 what is the correct syntax for that... quote inside or outside the brackets ?

Image

#2 I want to reference the summary field, mapped to a normal FM field, just like any another field on Source No 1 layout. What is the proper syntax ?

Because event.titleEdit doesn't work
Image

Image

it doesn't show the data in the field mapped to it
Image

but if I use event.title or even.description it work
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Wed Jan 08, 2020 4:12 pm
Hi Jean-Francois,

#1, the correct format is '[[fieldname]]' with single quotes outside the brackets. Thanks for pointing that out. I've updated the docs.

#2, The values for the event object in custom actions is defined by your "DBk_EventSummaryCalc" field (not the Source No X layout). event.titleEdit is defined as the sc_summary variable in the "DBk_WebViewerSource" calculation. event.title is defined as the sc_summaryCalc field in the "DBk_WebViewerSource" calculation.

The "Source No X" layout is used for saving event changes back to the FileMaker record. So, if you're using the summary field (sc_summary) for your tooltip, and you're using a calculated field, then just set the "summary" field on the Source No X layout to "DBk_Unused" to prevent from receiving 201 errors when saving event changes back to the record.
Next

Return to DayBack Calendar for FileMaker

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: