Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 3760 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi Tim,

 

Can I create one database with both the hosted and mobile scripts, layouts, etc., and just copy it to my iPhone or do I need two separate databases?

 

Thanks,

Peter

 

Posted

If the solution is hosted on FMS you can use the same file(s). However you'd want to design layouts that work on your iPhone and Get the device type to direct the phone to the appropriate layout.

  • Newbies
Posted

HI Rick,

 

Thanks for the reply.  I already have a completely operational database with iPhone and iPad layouts, and about 30K records.  I was hoping I didn't have to make a new database for remote users.  I have about 20 remote users and deploying a different database would be difficult to explain at best.

 

Peter

Posted

It can be the "same database". But you will obviously need to have mobile friendly layouts for those remote users.

 

Also, consider how you are keeping the primary database updated...via sync, etc...because obviously there are a lot of reasons someone may not have an internet connection back to the hosted solution.

Posted

Personally I would avoid any syncing issues altogether. Have the solution reside on FMS . That way you always know who's boss (which file).

  • 2 months later...
Posted

for some reason i have to put all the synk option in a single file, do i have to have a easysynk table for the hosted option  and a copy of it for the mobile synk option?

i made some change in your example having to synk tables but i get a 106 error in the "pull payload" script.

As you can see in the picture i prepared all to be merge in to the host file.

 

post-61422-0-50460700-1409586850_thumb.j

Posted

Franco --

 

What does the relationship graph look like in the hosted file? Are the table occurrences that you want to sync named the same in both the hosted and mobile databases?

 

-- Tim

Posted

my explnation was "fuzzy", i made new test, i put all the scripts and layouts on the  file FM_Surveys_Hosted, then, i put one copy in the server and a second renamed on my ipad.

it work.

 

New test is to implement the sync option in the Invoice example included with the filemaker Pro, and this is my goal:

 

1) Products list, Client tables shared between all, 2 remote iPad and 1 connected clients to the server. all will see the same data.

 

2) Invoices, products in stock tables  have different progressive numbers for each remote pos and clients, then as they sync they should sync only from remote to server. each one will see only their data.

 

About the connected client is just a script problem, for the 2 ipad i am trying to understand the right way to do, probably the answer is already in the easysynk demo, but at the moment i have some problem to understand how, could you huo tell me how to do sync by device or account?

My best regards

Franco

Posted

i finisched my test, my goals were:

 

single file.

upgrade thr filemaker standard invoice file to a "synckable" solution.

 

Result: IT WORK.

 

now i have to add the second level of test:

 

The products and clients tables have to be completly syncked.

The Invoices and stock tables have only synched by devices.

Many thanks for you help

franco

Posted

on the script "Prepare Payload for Client"

i am changed in this way:

 

the Var  $dyn_sql setting:

-------------------------------------------------------------------

"SELECT " &
$dyn_sql & ", '" & $$record_delimiter & "'" &
" FROM "" & $sync_table & """ &
" WHERE " &

// Exclude records flagged for sync exclusion.
"( COALESCE ( ES_Exclude, 0 ) = 0 )

/*
$pg var is the privilege group
.

Pgroup is the field with the privilege.

esclude all the group different to $Pg
/*

and
( COALESCE ( Pgroup, 0 ) <>   " & $Pg & " ) "
&


// If the client is merging new/updated data with data already on the device...
// Only include records that have been added/updated since the last pull...
// And only include data that they did not just push (i.e. no "round tripping!")...
If ( ( $$sync_method = "Merge" ) and ( $last_pull_utc > 0 );  "AND ( ES_UTC_Time > " & $last_pull_utc & " ) " &  "AND ( COALESCE ( ES_Device_ID, 'X' ) <> '" & $client_persistent_id & "') "; "" )

-------------------------------------------------------------------

 

it doesn't work because i don't know sql, then again please any suggest?

post-61422-0-73921500-1409936904_thumb.j

Posted

still doesn't work

 

Var   $dyn_sql :

 

--------------------------------

"SELECT " &
$dyn_sql & ", '" & $$record_delimiter & "'" &
" FROM "" & $sync_table & """ &
" WHERE "
&
" ( ES_PrivGroup =  ""  & $Privgroup   & ""  ) "
&
" AND
( COALESCE ( ES_Exclude, 0 ) = 0 ) ) "

&
If ( ( $$sync_method = "Merge" ) and ( $last_pull_utc > 0 );  

"AND ( ES_UTC_Time > " & $last_pull_utc & " ) "
&
"AND ( COALESCE ( ES_Device_ID, 'X' ) <> '" & $client_persistent_id
&
"') "

; "" )

--------------------------------

the red part is my add, i get the error code 106.

Please tell me were i am wrong?

Posted

It looks like you're trying to use double-quotes in the SELECT statement.

 

Try this...

 

Var   $dyn_sql :
 
"SELECT " &
$dyn_sql & ", '" & $$record_delimiter & "'" &
" FROM "" & $sync_table & """ &
" WHERE "
&
" ( ES_PrivGroup =  '"  & $Privgroup   & "'  ) "
&
" AND ( COALESCE ( ES_Exclude, 0 ) = 0 ) ) "
 
&
If ( ( $$sync_method = 'Merge' ) and ( $last_pull_utc > 0 );  
 
"AND ( ES_UTC_Time > " & $last_pull_utc & " ) "
&
"AND ( COALESCE ( ES_Device_ID, 'X' ) <> '" & $client_persistent_id
&
"') "
 
; "" )
  • 1 month later...
Posted

Hello

I want to have the same database as

Client and hosted version. Do you

Simply insert client and server scripts

In one database and it works out of the

Box or do you have to make changes to scripts

And sync layouts.

My database is already iPad friendly.

Thanks

This topic is 3760 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.