Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need help on Web database

Featured Replies

I have a local shared db which lists various clients and items, I need to create a separate web db so one client can see their items (search only)- what is the best way to create it so it has the real time changes from the local db.

Publish database on Web with CDML and Custom Web Publishing.

When web client will log into your system, include his/hers ID in all searches, as hidden field so they will see only their records.

  • Author

Many thanks - I here it is better to keep the web db separate - what is the best way to do this?

smile.gif nice joke smile.gif

You could use a Script which updates the "Web DB" each time a record is edited in the "Main DB".

Good Luck.

Garry

  • Author

thanks Gary - what's the best way to do this.

Hi, gowrann! Yeah, that bugs... The FMP docs on web publishing have a great little diagram that shows the recommendation of publishing a web DB pseudo-clone instead of your main DB but they don't tell you how to do it. I asked this same Q a ways back and folks basically said what Garry just said... use a Script.

I didn't know scripts well and didn't know how to auto-execute a script based on a user action, so I ended up just publishing the main DB. You can use Web Security Database to limit which fileds are accessible, but not a per user basis; it's all or nothing. Then you can control record searches (somewhat, not secure) by labeling each record with 2 fields: the "owner/client" and their "password". Using EXACT SEARCH to require both fields be entered at your made-up login screen, only their records should show up in the results. A wrong login or wrong password will have no records found.

Hope this helps!

--ST

  • Author

yes that great little diagram showing a perfectly sync'ed db is what I saw but can't work out how to replicate. (excuse the pun)

I would rather share a different one for the web as it will only be used for searching older records - I could do a crude cron copy very xxx hrs but would rather script it - anyone have any ideas on a script...

You may want to have a button on the Layouts of the main file which can run the script manually whenever a record is updated.

Alternatively, you can use an Applescript as a timer for regular-interval updates.

All the best.

Garry

  • Author

Gary can you give an example of the script

Which script?

The update script?

or

The Applescript for the timer?

I don't use this method so I do not have scripts for it. However, I have scripts that can be adapted to do what you require. I may have some spare time later next week I can do some work on this!

All the best.

Garry

  • 2 weeks later...
  • Author

Hi Gary - I would like to see it with the update script.

Thanks

For a similar solution I use a file (the web access one) which has only one data field. This field is the Item_ID. All other fields in the database are Calculated; they are simply pointers to the related fields.

I am travelling this week (in Sydney) however I should get a chance to write a demo script for moving data from from one file to the other.

All the best.

Garry

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.