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.

Access to specific record

Featured Replies

Hi all,

I have a database that is being accessed via custom web publishing externally and I would like to generate a url for a specific record, is this possible?

The idea being that if I generated a url to a specific record I could email it and the end user and they would only have access to that 1 record.

Thanks,

Nik

 

Sure...  what have you tried and is not working?

Since this is CWP you have full control over how to put the together.  Under the hood is just comes down to using the PHP or XML API to do the search and return the data the you show the web page that you constructed around that data.

  • Author

Hi Wim,

thanks for your reply. Apologies but my question was with FileMaker WebDirect rather than CWP. Do you know of a solution for WebDirect?

 

Thanks,

Nik

WebDirect allows you to specify a script to run for instance and pass it a parameter so you could pass in the record ID that the script should search for.

However WebDirect requires that the user is already authenticated so from a security point of view you may have an issue there.

  • Author

Hi Wim,

thanks again for your reply. I think the safest option is your first suggestions.

I'm planning on creating a field in the database that contains a random string and then make that form part of the url, then perform a find for that unique string so that a user can only access the specific record details. I have managed to perform this first part but now it's just a case of making it look pretty! (total noob to php/html)!!!

Thanks,

Nik

If you are actually using WebDirect, then should be no html or php that you need to do anything with - the web pages are generated from the layouts in the database with no need for intervention.

And the answers to this question will be very different - are you using WebDirect, or are you using Custom Web Publishing (with either the FM API or the XML interface) ?

Are you using v 11 or v15?

  • Author

Hi guys,

sorry for the confusion. Originally I was trying to find a solution using FM's built in WebDirect solution, so that I didn't have to build any pages but as Wim indicated this would be difficult due to the authentication WebDirect requires. So I've started to look at building a php page that will perform a search for the specific record and then display the results.

 

I'm using Filemaker Server 14 & Filemaker Pro Advance 14.

 

Thanks,

Nik

  • 2 weeks later...
  • Newbies

Please find attached a test PHP file,using custom web publishing, You can replace the variables values with your actual values.

Create following URL from you FileMaker and you can email it.

http://<your server ip or domain name>/test.php?ID=1

 

Note:

This page needs to be hosted on your Web server having FileMaker.php and FileMaker folder provide by FileMaker.test.phptest.phptest.php

 

 

  • Author

Hi Shweta, this is amazing help with great comments. many thanks for this.

Could I ask one questions please. My database is for Purchase Orders so I have a parent record that displays all of the purchase order items via a portal. When I find the Purchase Order  record based on the ID will the find results also contain the Purchase Order items data from the portal?

Many Thanks again,

Nik

The data from the request will include _ALL_ data shown on the layout used in the request - if that layout includes a portal, then the relevant portal data will also be returned.

 

 

  • 1 month later...
  • Newbies

Sorry captain_caveman for late reply.

The answer to your question varies depending on the layout.

If you are finding on a layout which has only Purchase Order related data then Purchase Order Items data will not be returned/displayed.

If the layout has portal of Purchase Order Items  then it will be displayed.

 

If you want data specific to Purchase Order Items then you need to find on a layout which is based on Purchase Order Items table with foreign key/id of purchase order.

 

Hope this helps.

Create an account or sign in to comment

Important Information

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

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.