AnsweredAssumed Answered

New to FM and need help with updating script

Question asked by ChronicD on Nov 17, 2009
Latest reply on Nov 19, 2009 by philmodjunk

Title

New to FM and need help with updating script

Post

Hello all,

 

Very new to FM and have hit a brick wall... what a surprise

 

I am trying to build a database that will facilitate the managing of shift workers for a small business, it is very much run off of a calender and i wish to retain that feel and effectively end up with a month calender as my start page user interface. from there different days can be picked etc... anyway i started building my tables for employee, client and job information - no problem. then i tried to figure out how to build this calender gui. Well i got a bit stuck here as it is not actually a calander i want but the feel of a calander. In any case i realised i would probably have to make my own and started hunting around for a guide on how to do this.

 

i found this http://my.advisor.com/doc/17166 by John Mark Osborne and thought that it looked simple enough i could do it. anyway i got to building the script for the repeating of the records for the days of each year and made a mistake and cant for the life of me work ut what. hoping someone will spot my error and push me in the right direction again :)

 

here is the script i wrote in fm 10 (oh thats right the script i am working off of was for 7/8)

 

Generate Days
Show Custom Dialog [ Title: "Year ( Date )"; Message: "Enter the value you wish to create"; Buttons: “OK”, “Cancel” ]
Set Variable [ $Date; Value:"Date" ]
Go to Layout [ “Days” (Days) ]
Freeze Window
Loop
  New Record/Request
  Set Field [ Days:: Dates; $Date ]
  Perform Script [ “Generate Days”; Parameter: Days:: Dates ]
  Exit Loop If [ Year(Days:: Dates + 1) = Year($Date) + 1 ]
  Set Variable [ $Date; Value:$Date + 1 ]
End Loop

 

Oh and i welcome any ideas for other ways i can go about this

 

thanks

dan






Outcomes