I have been able to integrate the calendar into my solution and it works great so far. It reads from my Events table. However let's say there are three customers with the same event, then three rows will appear in the month view on the calendar. That's ok. However when I click on, say, the 2nd row, the Event Detail layout will pop out, but it is on the first record in the set. No matter which row I click in the month view day, it always goes to the first Events record. If I scroll wheel, then I can go to the other records in the set.
I've tried setting a variable with the recordnumber in the beginning of the "Click in Event" script and then going to that record number at the end, but it appears the variable is always setting to 1, or the first row, even if I click the 2nd or 3rd row for example.
Can someone explain why this might be happening? Thank you!
Go to row
8 posts
• Page 1 of 1
Posts: 4
Joined: Sat Jun 11, 2011 4:15 pm |
|
Hey Kenneth,
Sorry I'm not quite following you here. Can you attach some screen shots to give me some more info...I'll have another cup of coffee as well Thanks! |
|
Posts: 4
Joined: Sat Jun 11, 2011 4:15 pm |
Thanks for the reply. I'm sorry I wasn't able to explain it right. Here are some screens to show you what I mean. Please see the attachment "Calendar.jpeg." Notice on the month view that on the 31st there are multiple items called "test." these were put on the calendar as a result of a script that inserts event items for each customer if they fit certain search criteria. So each line is for a different customer. However each line I click on shows the same row on the Event Detail layout that pops out for the item. See EventDetails.jpeg. Once the layout pops out, I can scroll through the related records and they're all there but no matter what row I click on in the 31st, it always goes to Christine Sanchez, the first row of the related set. To make it go to the same row when it pops out the event details layout, I tried to change the Click in Event script to set a variable at the beginning with the recordnumber, then go to that same one when the layout pops out, but its like a click doesn't actually activate the row selected, since it appears to set the first record every time. I would like it to go to the row number that I clicked in the month view of the calendar. My ignorance comes from the fact that I honestly don't understand how the calendar setup works basically, but I love how I was able to just snap it in. Sorry again, I hope that explains it better. Thank you for showing patience with me.
|
Hi Kenneth,
Thanks for the details. Unless there's an overlap (which you can't have in month view) or the events have the same id, then it should only bring up one event. In the script Click in / Drag Event we use the variable $sc_Row (defined by CalendarRows::RowNumber ) and $sc_Column ( defined by Get ( ActiveRepetitionNumber ) ) to determine which "slot" you clicked in. We then use the row and column to figure out the primary key/UID of the event: Once we have the id, we then use it to find and scroll to the event if there are overlaps: It seems like it might be something with the ids (not unique maybe?) Let me know if any of that helps, -Jason |
|
Posts: 4
Joined: Sat Jun 11, 2011 4:15 pm |
Yep. That's indeed what it is. Each eventID is not unique. The Events table, which is the data source, is also sort of a "join tabe" as well. So the eventID will not be unique but each record is marked with the CustomerID it belongs to. I would prefer not to change this structure but I will if I have to. I thought of setting it to the row from the $sc_Row variable but it goes to like row thirty-whatever. Another way I thought was maybe setting a variable in the Click In/Drag in script for the fk_CustomerID and then doing a find/constrain in the click in event script Still brainstorming on the least invasive way. If you have suggestions I'd love to hear them. I do appreciate the help a lot! |
Hi Kenneth,
I'm not a purist by any means, but we typically want to have a unique id (primary key) for every record, and there's a fair amount of our code that assumes these are going to be unique, so I'm afraid you will run into other problems. You're not going to be able to capture the fk_CustomerID Click In/Drag in script, because there's no direct relationship back to the events from the calendar views (except "sort of" in day view). We're just reading the global variables that we've built, and we don't write the fk_CustomerID to them. I think the tried and true unique id is the way to go here, Jason |
|
Posts: 4
Joined: Sat Jun 11, 2011 4:15 pm |
Boo! jk, I will work towards that. Thansk for the help. |
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests