AnsweredAssumed Answered

Import records step work around in FMgo

Question asked by cdub5 on Dec 16, 2014
Latest reply on Dec 16, 2014 by cdub5

Title

Import records step work around in FMgo

Post

Hi

I have a database which allows users to fill out carry out interviews whilst out in the field via FMgo. The database holds several sets of questions in a "questions" table. Each set of questions has a related "SurveyID" from a related "surveys" table. When a user starts to carry out an interview they choose a survey to carry out.  An import records step is then triggered, importing all the related "questions" records for their selected survey into another table within the database. From here they pick related responses. Currently this works well with Filemaker Server but i am needing to create an offline version of the database for when users have no wifi/mobile signal coverage.. Unfortunately the imports record step will not work importing into the same file when FMgo is working with a local file. Would anybody be able to suggest a workaround with my script?

After choosing a survey to carry out:

not [IsEmpty ( Questions::_fk_SurveyID ) // confirm that question records exist]
  Set Variable [$InterviewID; Value:Interview::__pk_InterviewID //sets their currently selected record ID as a             variable]
  Go to Related Record [Show only related records; From table "Questions"; Using layout: <questions>]
  Sort records by Field [Ascending; Questions::__pk_QuestID}
  Import records [No dialog; "Interviews.fmp12"; Add; Windows ANSI]
  Go to Layout ["InterviewQuestions" (InterviewQuestion)]
  Replace Field Contents [No dialog; InterviewQuestions::_fk_InterviewID; $InterviewID //makes the imported           records related to their interview]
  Go to Layout ["IPAD Main" (interview)]
End If

Thanks!


  


 

Outcomes