Hi,
I want to export an ics file for each of my resources separately, then have the Event Plugin automate this for me.
How do I script the Find settings?
I want to copy and edit "Export Appointment Found Set as iCal" to have the search paramaters in it.
For Example - Find all ResourceA for all time, or between two dates, or after a certain date.
How do I save a found set in a script?
3 posts
• Page 1 of 1
Posts: 22
Joined: Tue Aug 23, 2005 3:40 pm |
|
Posts: 19
Joined: Thu Jul 07, 2005 3:24 pm |
Heya -
What we did was run an loop script that looks like this: (not FM code) go to layout with resources go to first record loop go to related records in appointments (in new window, name it TEMP or something) enter find mode, specify criteria to your date range, then constrain found set run export script if found count > 0 close window "TEMP" go to next record in resources end loop This will basically loop through all the resources and export all the related appointments for those resources. We then run an AppleScript that renames the exported file, but I suspect that with FM8 there's a better way to name the file. I just haven't played enough with it. Hope that helps! |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Here is what we do in FM8. In the Export Found Set as iCal script, we inserted a Set Variable step right before the loop: Set Variable Name: $FilePath Value: "file:" & Get ( DesktopPath ) & Substitute ( LeftValues ( AppointmentsDaily::ApptType ; 1 ) ; "¶" ; "" ) & ".ics" Note that this names the file with the type of the first appointment in the found set: very useful if you're exporting each appointment type as its own found set. When these different files are then brought into iCal, each gets their own color (in PHPiCalendar they are each their own "calendar"). Then, in the Export Record step, you just use the variable name $FilePath as the export path. John Sindelar
SeedCode |
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests