9 Replies Latest reply on Aug 31, 2009 6:51 PM by ddixon752

    Instant Web Publishing Help

    ddixon752

      Title

      Instant Web Publishing Help

      Post

      I'm working with a Filemaker Web Hosting Service trying to get a database operational for some school recordkeeping.

       

      I'm just trying to do a simple setup where there is one file in which we create new records for missing student assignments - one record per incident. Next I set up a second file with student info - name, parent contact, grade, etc. I made a match field of our student ID number, just wanting to have teachers enter the ID and have the student info populate the fields in the first file.

       

      All works perfectly in FMP on the desktop. On the web, published with FMP Server Advanced 10, it also works from the web browser, but only once. At first it seemed that the main file was having trouble connecting to the related file, so the hosting service recommended that I merge the second file into an additional table within the first file rather than using a separate file.

       

      Well, I did that, but it didn't fix it. Now I discover that what's really happening is that when I add a new entry and the match field populates the fields in the main file, the database then DELETES the data in the second table. It's like it's moving that data rather than just displaying it in the main layout. Further adding to my confusion - any data in fields that are populated by the ID number entry are NOT deleted if they are not included on the layout where the entry takes place.

        

      This seems like a pretty basic, common thing to do. Can someone please shed some light on what I might have done to make this deletion happen, or do I need to make a layout that has none of the related fields on it and have the ID number entered there??? Surely there's a better way.

       

      Thanks so much for any help you can give!

       

      David Dixon

      Knoxville, TN 

        • 1. Re: Instant Web Publishing Help
          ddixon752
            

          Well, no replies yet, but I have solved the problem by making the layout on which the users enter the match info (the student ID), a special screen that has no other fields on it so the data in those other fields doesn't get deleted.

           

          If anyone has any input on why this lookup approach was partially broken in web publishing, I'd be appreciative.

           

          Thanks 

          • 2. Re: Instant Web Publishing Help
            davidanders
              

            Unsure, from your post if a script is involved.

            Some script steps are incompatible with instant web interface, you can choose to turn on web compatible steps in the script editor.

             

            • 3. Re: Instant Web Publishing Help
              ddixon752
                 Thanks - but there was no script involved, just a match field that populates fields in a table from related fields in a second table.
              • 4. Re: Instant Web Publishing Help
                mmccarty
                  

                I'm a little confused about your problem but if I am understanding you correctly you want to go to the web and find a student record,  and all the missing assignments for that student.  The easiest way to set this up (and I apoloagize if this is what you already have) is when you create the relationship between the tables with student ID to "allow creation of records in the 'missing assignment' table via this relationshp".  Then set the Missing Assignment::student ID field up to manully enter a Loop up value = Student::studnet id.

                Create a layout that pulls from the Student Record and on it have a portal to the assignemnt table with all the fields you need.  Then when I teacher wants to create a missing assignment record, they just need to find the student, click into the portal and type the new information into the blank box that appears.  When they are done they just click "commit"  [Note: I am assuming that you let your users have the status bar, if not it is easy to provide the "commit" script step, let me know if you need me to explain how].

                 

                If you want to delete missing assignments once they have been turned in, then you will need a simple script.  Or you could create a field in missing assignment that is either "compete" or "incomplete and add that to your relationship.  This would allow you to just mark the assignment as complete in the portal and it will automatically be removed (not deleted just not showing in the portal anymore).  That way you could keep track if a student is consitently turning in work late.  Let me know if you want me to elaborate on either of these options.

                 

                If all of the above is useless to you, please walk me through how one of your teachers would go about adding an assignment.  What layout do they go to?  What table is that layout pulling from?  What is entered manually and what is auto entered?  etc 

                My database uses IWP and I must have run into every possible problem there is by now, well at least I hope so.

                • 5. Re: Instant Web Publishing Help
                  ddixon752
                    

                  Wow, thank you for the detailed response. Maybe I can explain my set up better.

                  My goals are: 1. teacher logs in and adds a record for a missing assignment  2. rest of the teachers can log in and see those entries (I have scripted buttons that let teachers view any that are Pending)

                   

                  I have a file with 2 tables.

                  Table 1 has blank fields for status, assignment description, etc. - teachers (or scripts) fill these in when they create a new record

                  Table 2 has student info - grade, homeroom, name, etc.

                   

                  The match field between the two tables is the Student ID - a school system provided 6 digit number

                   

                  All the info in Table 2 has been pre-imported. Every layout includes fields that are a mix of Table 1 fields and fields that show Table 2 data via the relationship set up with the Student ID field. I originally had two different files, but my hosting service suggested 2 tables in the same file might work better for IWP. So...

                   

                  Teacher logs in, clicks in the Student ID field, enters the 6 digit number, submits

                  All the info from Table 2 appears in the related fields. There is also a script that fills in some Table 1 text fields, etc.

                   

                  All of the above was working fine on the desktop, but when published on the web, submitting the Student ID didn't just make the data from Table 2 show up - it MOVED it. It no longer existed in Table 2 and subsequent entries of the same Student ID would not populate the fields, because the data in Table 2 was deleted.

                   

                  In looking for a workaround, I discovered that any Table 2 related fields that were NOT showing on the layout from which the Student ID was entered, were NOT deleted and worked flawlessly.

                   

                  So, my workaround was to do the ID submission on a special layout that has no other fields on it - and now all is fine. After they submit, I have a Continue button that moves them on to the desired layout. The data is there as it's supposed to be and works more than once now  :-)

                   

                  I have to confess, I have not done a FM design of this magnitude since about v.5.5, and still don't quite have my head wrapped around the table concept, so there was probably a cleaner way to do all this. I was just curious still about whether this was due to my approach to the structure of the thing, or if I was just running into a limitation of IWP.

                   

                  Thanks again for the help and your time.

                   

                  David Dixon 

                   

                   

                   

                  • 6. Re: Instant Web Publishing Help
                    mmccarty
                      

                    Your records were not deleted they just weren't showing up?  Unlike Filemaker, IWP can only display 25 records in list view and 50 in table view at a time.  If you have more than that on a page, you have to use the Next and Previous Buttons to view the rest. 

                    Also if your records are in list view, when you click on a field or white space near a field, filemaker goes to that record.  The consequence of this in IWP is say I am looking at 10 records and I click into a field in record 5, filemaker gives that record the focus  and moves it to the top.  Well now I can only see records 5-10.  If you give your users the status bar this should not be a major problem, they can just hit previous to get to records 1-4.  However if you remove the status bar (like I did to restrict users movement) you have a problem because to the user, records are disappearing in front of their eyes.

                    You have to script the ability to get these hidden records back.

                     

                     

                     

                    • 7. Re: Instant Web Publishing Help
                      ddixon752
                        

                      Well, no records were deleted. I could see all the records. The fields that were supposed to be filled in with data from Table 2 didn't work. On the layout, several fields were defined as being from the related table. When I enter the match field info, the Homeroom Teacher name, for example, which is stored in table 2 shows up on the layout correctly. However, if I then make a new record and enter the same ID in the match field, the HomeRoom Teacher name does NOT show up correctly - that field in the record is blank. I discovered that in table 2 the Homeroom field is now blank for the student whose ID I had entered, and that's why the data wouldn't show up again.

                       

                      But, if i hide the Homeroom field and don't include it in the layout where the Student ID is entered, THEN switch to a layout that includes the Homeroom Teacher name - it's always there and works every time.

                       

                      OK, this is too much thought for a Friday afternoon - thanks!

                       

                      David 

                      • 8. Re: Instant Web Publishing Help
                        mmccarty
                          

                        So let me see if I have a handle on your problem.  You go to the web and create a new record in table 1, aka missing assignment. You fill in the student ID, which is the link to table 2, aka student info.  Now you want all the info from table 2 to appear on the screen after you type the student ID.  When you are using FM it works but not IWP. 

                         

                        Do you commit the record after you enter the student ID?  Commit Record/Request sends the new info to the server who processes it and sets up the relationship.  I think this mite be what you are doing when you change layouts.

                        • 9. Re: Instant Web Publishing Help
                          ddixon752
                            

                           


                          mmccarty wrote:

                          So let me see if I have a handle on your problem.  You go to the web and create a new record in table 1, aka missing assignment. You fill in the student ID, which is the link to table 2, aka student info.  Now you want all the info from table 2 to appear on the screen after you type the student ID.  When you are using FM it works but not IWP. 

                           

                          Do you commit the record after you enter the student ID?  Commit Record/Request sends the new info to the server who processes it and sets up the relationship.  I think this mite be what you are doing when you change layouts.


                           

                           

                           

                          Yes, this is all correct, except that it always worked in FM and also worked the first time in IWP, but NOT upon subsequent new record creation using the same ID (for example, if the same student had a second missing assignment). In those cases it would successfully create and save the new record, but would not fill in the fields linked via the relationship. In IWP, the first time an ID was entered, it seemed to MOVE the data from table2 to table1 rather than just display it. So, on the next entry of that ID there was no data in the table2 fields to display in table1.

                           

                          Yes, the original setup had the teacher entering the ID, then clicking the Submit button manually in the Status Bar. However, that would cause the above described problem of working only once. I finally discovered that this problem only occurred for fields that were included on the layout where the ID was entered and Submitted - if Homeroom, Grade, Team, and other fields were NOT included on the ID entry layout, everything worked as desired. So my workaround was to make a special screen for ID entry that had no fields on it except the ID.

                           

                          Now the users enter the ID, click Submit, then I have a Continue button that switches layouts and enters text in a couple of other fields.

                           

                          It's working great, I spent today training teachers in the use of the database, and we roll it out for use tomorrow. I just could never understand why my original approach didn't work.

                           

                          Thanks!