captain_caveman Posted October 6, 2016 Share Posted October 6, 2016 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 Link to comment Share on other sites More sharing options...
Wim Decorte Posted October 6, 2016 Share Posted October 6, 2016 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. Link to comment Share on other sites More sharing options...
captain_caveman Posted October 6, 2016 Author Share Posted October 6, 2016 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 Link to comment Share on other sites More sharing options...
Wim Decorte Posted October 6, 2016 Share Posted October 6, 2016 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. Link to comment Share on other sites More sharing options...
captain_caveman Posted October 7, 2016 Author Share Posted October 7, 2016 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 Link to comment Share on other sites More sharing options...
webko Posted October 9, 2016 Share Posted October 9, 2016 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) ? Link to comment Share on other sites More sharing options...
Lee Smith Posted October 9, 2016 Share Posted October 9, 2016 Are you using v 11 or v15? 1 Link to comment Share on other sites More sharing options...
captain_caveman Posted October 10, 2016 Author Share Posted October 10, 2016 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 Link to comment Share on other sites More sharing options...
Newbies shweta Posted October 21, 2016 Newbies Share Posted October 21, 2016 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 Link to comment Share on other sites More sharing options...
captain_caveman Posted October 21, 2016 Author Share Posted October 21, 2016 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 Link to comment Share on other sites More sharing options...
webko Posted October 23, 2016 Share Posted October 23, 2016 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. Link to comment Share on other sites More sharing options...
Newbies shweta Posted December 8, 2016 Newbies Share Posted December 8, 2016 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. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 2824 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 accountSign in
Already have an account? Sign in here.
Sign In Now