Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum

Recommended Posts

James56

Thanks to everyone and Happy New Year!

I have a database that has a layout in it that is used to take attendance. It has a row of fields across the top that show the dayname of the week and daynumber. This is setup using a script and works. If I select a month from the drop down and a year the fields across the top change to reflect this selection. Maarten helped me write this script and it has served me flawlessly. I am now in the process of rebuilding a new database using FM14. I copied the needed fields into the new database table and imported the script from the old. There were errors (as expected) and I made the changes. If I select the drop down Month and pick anything but the 1st of any month the script doesn't fill in the fields. If I pick Jan of any year the fields are filled in accurately. I jus spent the last 6 hours trying to figure this out but just can't. Is there a major difference in the way FM14 handles globals and varibles from FM12? I printed out the script and will attach it to this if someone can take a look.

Thanks,

Jim

Attendance.pdf

Edited by James56

Share this post


Link to post
Share on other sites
James56

Well, I took my old database (a copy) and stripped everything out of it - layouts, tables, scripts, records and script triggers except for the globals labeled zg_g.d1 thru zg_g.15, the field zg_g.Month and zg_g.Year. I renamed the Table to match my new database and the layout also. Then I copied the table contents to the new database, copied the layout to the new database and imported the script. There were no errors as everything matched. Regardless, the script only manages to fill the fields if I select the first month (1) and any year. It works every time. If I select any other month the fields are blank. Anyone have any thoughts? It appears to be something to do with the file being made in FM12 as opposed to FM 14.

Thanks

Share this post


Link to post
Share on other sites
doughemi

The first place to check is to ensure that all the relationships between the tables are the same as in the old file. Your description has all the earmarks of an invalid relationship.

 

A FileMaker 12 file should run without modification on FileMaker 14. Have you tried running a copy of the old file unmodified on the new system?

Share this post


Link to post
Share on other sites
James56

Doughemi,

There is something wrong for sure but I don't see how it can be a relationship as there isn't any! My old file works when opening it using FM14. I stripped everything out of it and made sure it has a unique table name and all of the fields (there's only 17) are unique also. With all of that done it works as expected. I then opened my new file, imported said table, script and copied the layout. I had to make 2 value lists but even they aren't really necessary only convenient. Even these I named and copied from the old file. I then closed everything, open the new file and tried it out. It will fill in the 15 fields correctly if I pick the first month (January) out of any year but no other month works! This is only for a paper print form to manually take attendance at my club. It prints a sheet that labels every Mon, Wed, and Fri for the chosen month across the top in a row (in the header) and then the names will be in a list. It has worked in every version of FM I've used from FM 8 until now. I just can't understand why it won't work. I have to have something in my new file that is causing this but don't see how. Any help is appreciated. Even a different approach that produces the same result? I've uploaded the script in a .PDF format so it can be viewed a bit easier but I'm beginning to believe it has something to do with something in my new file that I just can't figure out.

Thanks,

Jim

Edited by James56
Uploaded the script in PDF format

Share this post


Link to post
Share on other sites
doughemi

You have at least two tables in your program: Students and AttendancePrint (see lines 1 and 4 of your script). What is the relationship between them? Is it the same in both files?

 

Please take a screen shot of the relationship diagram of both the old and new files and post them. Or post a clone (no records) of both of them.

Edited by doughemi

Share this post


Link to post
Share on other sites
James56

Doughemi,

I do understand the confusion. The small parts of the script dealing with a relationship are disabled and there is no relationship. Right now all I'm trying to accomplish amounts to filling a bunch of fields in the header that follow the daynames and daynumbers of a month - any month - across the top. Eventually there will be a relationship and that seems to be easier to accomplish then what I'm trying for some reason. My file only contains fake records and very few of those. I can empty them both and post but unfortunately I'm running late and must get back to work. I will be back on later.

Thank you.

Jim

Share this post


Link to post
Share on other sites
sharpie

Hi James

 

Your set field steps don't seem to specify a field to set, they're just specifying what to set it to i.e. "" or the 2 Left words of a date. Could this be your problem?

 

Sharpie

Share this post


Link to post
Share on other sites
James56

Sharpie,

Thanks for you help. Jean Wenmeekers solved this for me. He pointed out that on line 17 (I think it was) I had the following:

GetAsDate (AttendancePrint::zg_g.Month & "/1/" &

AttendancePrint::zg_g.Year)

 

and he showed me that it should have been:

Date ( AttendancePrint::zg_g.Month ; 1 ; AttendancePrint::zg_g.Year )

I had copied the entire script and layout from an older version of my solution and it just wouldn't work. Jean said the script was poorly written hence easy to 'break' when copied. I really am a novice and try to learn by my mistakes but I'm not sure I'll live long enough to succeed!

I should have closed this thread but once again I show my lack of knowledge.

Thank you and take care,

Jim

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use