1 Reply Latest reply on Oct 14, 2013 12:47 PM by philmodjunk

    Trouble Creating Related Record

    sccardais

      Title

      Trouble Creating Related Record

      Post

           Each month, we receive Survey responses in the form of a csv file from customers. We want to import this into a Filemaker database and add our own classifications to help prioritize new features, trends in customer satisfaction, etc. 

           So far, this involves two Filemaker tables:

             
      •           Surveys. Imported via csv file into Filemaker. Source file contains populated Survey ID field.
      •      
      •           Reviews. Contains our categorization fields and uses Survey ID to link Reviews to Surveys.

           After importing new Surveys, we want to classify each customer Survey.

           A Reviewer will start with a view showing all Surveys that have not been Reviewed yet. The Reviewer will use a button to ADD REVIEW.

           This will open a new view showing some fields from the Survey and all of the fields from the Review table. 

           Starting from a view in the Surveys table, I have not been able to create a new related record in the Reviews table that automatically populates the Survey ID field in the Reviews table.

           I know this must be relatively simple but so far, I haven't been able to do it.

           Any help would be greatly appreciated.

           Not to complicate this help request but, on the Reviews screen, I would like two buttons:

             
      •           Save / Next
      •      
      •           Save / Quit

           Additional Notes:

           I'm assuming I can use an auto-entered Create Date from the Reviews table to identify Surveys that have not been Reviewed yet.

           Eventually, I would like this database to be accessible online. There wil be very few concurrent users. Since it contains customer information, security access to this database will be very important. 

           Thanks very much for any and all help.

            

            

        • 1. Re: Trouble Creating Related Record
          philmodjunk

               Don't see the need for any Save button.

               #This script creates a new record in Reviews linked to the current record on the Surveys layout
               Set Variable [$SurveyID ; value: Surveys::SurveyID ]
               Go to Layout [Reviews (Reviews)]
               New Record/Request
               Set Field [Reviews::SurveyID ; $SurveyID ]
               Go to Layout [original layout]

               You can omit the last step if you want to stay on the Reviews layout.

               It is also possible to do this without any script if you use a portal to Reviews on the Survey layout to create review records. This would require enabling "allow creation of records via this relationship" for the Reviews table.

               

                    I'm assuming I can use an auto-entered Create Date from the Reviews table to identify Surveys that have not been Reviewed yet.

               Perhaps it would be simpler just to perform an "omit" find with an * entered into the Reviews::SurveyID field. That would omit all survey records with at least one linked Reviews record.

               You may find it helpful to redesign your tables into a much more flexible format even though it will complicate the import process if you do. Here's a thread that discusses the tables and relationships that might be defined for a survey: Need aid on generating a report from a survey layout.