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

Filemaker Runtime Updating versions

Question

SkipW

I have a created a database that I would like to sell as a standalone runtime solution. Once a customer has purchased the database, and has added entries including jpeg graphics in a container field, if I create a new version, how does the user with the old version update to the new version without loosing his data, including jpegs?

There is a data file that is in the old runtime folder, but if I copy that file to the new runtime folder, it won't recognize it.

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
D0N

You can export all the file's data, install your new version, then import the data back into the (now empty) database.

Share this post


Link to post
Share on other sites
  • 0
AHunter3

Create a script that goes to Layout named in Get(ScriptParameter), does a Show All Records there, and finishes up with Exit Script w/result Get(FoundCount)

 

Clone your db file(s) and give it/them names according to a rule, such as where FileName.fp7 is existing file's name, "FileName OLD.fp7"

 

To each file in your solution, add it's respective FileName OLD to Manage --> External Data Sources.

 

Now write a routine in your live file that goes to a layout that is native to a table, for each table in the file, and from that layout call as a subscript the script in FileName OLD that goes to the layout of the same name and shows all and exits wtih foundcount; store Get(ScriptResult) in a $variable and then import, matching names, from FileName OLD, same table of course, trap for Get(FoundCount) when done, sort by auto-enter serial and set next serial value to highest plus one, then go to a results screen and record that you just imported from ThatTable with sourcefile foundcount, destination foundcount, duration it took, etc. Repeat for all tables, (and files if multiple files).

 

 

Finally, create a script that will either use AppleScript to do shell script or Send Even to cmd, and issue appropriate command line instrux to rename each file in your solution that would be IN a folder NAMED "Old MySolution", ON the user's Desktop, from FileName.fp7 to FileName OLD.fp7, and hook that script up to an Update button.

Share this post


Link to post
Share on other sites
  • 0
tmas73
Create a script that goes to Layout named in Get(ScriptParameter), does a Show All Records there, and finishes up with Exit Script w/result Get(FoundCount)

 

Clone your db file(s) and give it/them names according to a rule, such as where FileName.fp7 is existing file's name, "FileName OLD.fp7"

 

To each file in your solution, add it's respective FileName OLD to Manage --> External Data Sources.

 

Now write a routine in your live file that goes to a layout that is native to a table, for each table in the file, and from that layout call as a subscript the script in FileName OLD that goes to the layout of the same name and shows all and exits wtih foundcount; store Get(ScriptResult) in a $variable and then import, matching names, from FileName OLD, same table of course, trap for Get(FoundCount) when done, sort by auto-enter serial and set next serial value to highest plus one, then go to a results screen and record that you just imported from ThatTable with sourcefile foundcount, destination foundcount, duration it took, etc. Repeat for all tables, (and files if multiple files).

 

 

Finally, create a script that will either use AppleScript to do shell script or Send Even to cmd, and issue appropriate command line instrux to rename each file in your solution that would be IN a folder NAMED "Old MySolution", ON the user's Desktop, from FileName.fp7 to FileName OLD.fp7, and hook that script up to an Update button.

 

Hi I just found this post and I have the same problem to import lots of fields and about 20 different tables. I do wonder if there is a sample file or a little better explanation. It's to advanced for me.

 

At the moment I made specific import tables with only the necessary fields. So I have all tables double and one version for import. I understand that the script needs to go to each layout table to export its content but how can it be automated without the use of the user?

 

I'm really lost on this one and any help would be great!

 

Thanks

Share this post


Link to post
Share on other sites
  • 0
AHunter3

You're the developer! So presumably you know the names of each & every table, and also of at least one layout for each table whereby the layout is NATIVE to at least some table occurrence OF that table, yes? So

 

Go to Layout [Get(ScriptParameter)]

Show All Records

Exit Script [with script result Get(FoundCount)

 

stick that in your file.

 

Call that script in oldversion of your file FROM newversion of your file, looping through all the necessary layouts in a script like so:

 

 

 

Perform Script [in MyFile OLD, GoToLayoutAndFindAll, with script parameter "Clients Layout"]

Set Variable [$RecordCount, Get(ScriptResult)]

Import Records [matching field names, from Clients to Clients]

If (Get (FoundCount) = $RecordCount]

.. Comment ["then you imported all the recs you SHOULD have imported. If you are doing a log, record $RecordCount and Get(FoundCount) in two separate fields"]

End If

 

Perform Script [in MyFile OLD, GoToLayoutAndFindAll, with script parameter "Job Ticket Layout"]

Set Variable [$RecordCount, Get(ScriptResult)]

Import Records [matching field names, from Jobs to Jobs]

If (Get (FoundCount) = $RecordCount]

.. Comment ["then you imported all the recs you SHOULD have imported. If you are doing a log, record $RecordCount and Get(FoundCount) in two separate fields"]

End If

 

 

etc etc etc etc for all tables using a layotu native to each table.

Share this post


Link to post
Share on other sites
  • 0
tmas73

Thanks for the explanation.

I'm al little unclear in

 

Import Records [matching field names, from Clients to Clients]

If (Get (FoundCount) = $RecordCount]

.. Comment ["then you imported all the recs you SHOULD have imported. If you are doing a log, record $RecordCount and Get(FoundCount) in two separate fields"]

End If

 

What is "from Clients to Clients"

 

and

 

".. Comment ["then you imported all the recs you SHOULD have imported. If you are doing a log, record $RecordCount and Get(FoundCount) in two separate fields"]"

 

I'm trying to recreate this so I run into this.

 

T

Share this post


Link to post
Share on other sites
  • 0
AHunter3

when you create the Import Records script step, you need a copy of your file to represent YourFile OLD; and you set up the import from that file from each table into the table of the same name in your new (current copy) file. In this example "from Client [a hypothetical table named "Clients" in Yourfile OLD] to Clients [same table, new/current copy].

 

The log would be kept usually in a separate Window

 

Select Window ["Import Log"]

New Record/Request

Set Field [import Log::Start TimeStamp, $StartTime]

Set Field [import Log::End TimeStamp, Get(CurrentHostTimeStamp)]

Set Field [import Log::TableName, "Clients"]

Set Field [import Log::Orig RecordCount, $RecordCount]

Set Field [import Log::Destination RecordCount, $FinalRecordCount]

Select Window [$OrigWindowName]

 

then on to next table/layout.

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

Terms of Use