Jump to content

Unique URS for each record


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

Recommended Posts

  • Newbies

Dear All,

I am trying to decide whether to develop a solution using FMP. A key requirement is for the database to be viewable on-line, with a unique URL for each record. I'm using IWP and I managed to acheve this the other day (the URL had a unique number somewhere in the middle for each record) but now I can't retrace my steps. Any tips please?

Pip

Edited by Guest
Link to comment
Share on other sites

The URL that displays in the browser address bar remains the same during the session.

If you enter a new record number and press ENTER, a frame reloads this URL (not visible in address bar):P

http://localhost/fmi/iwp/cgi?-db=Sample&-recordnumber=2&-goto=

where above goes to record #2 in database 'Sample' hosted on localhost. You can use this URL directly, but it will require a login first. The login can be expressed in a URL, but can't be 'stacked' with the go to record command. Also, no navigation bar will appear if above is entered in the browser address bar. You may be better off publishing the data as XML and having the webserver render it, using Filemaker's custom web publishing, or writing a script to generate one file per record and ftp it to the server (if database is very small). Alternately, a server-side script could handle logging in, and then loading above URL and echoing it to the client, to avoid the login screen. Does the data need updated from the web and does user need to be able to see other records on the web? Is the data updated frequently or is static publishing an option?

Similarly, an example find request comprises a load of http://localhost/fmi/iwp/cgi?-find= to enter find mode, followed by a load of http://localhost/fmi/iwp/cgi?-type=&-relatedrecid=&-omitstate=false&-submitclose=&3%281%29.1=Steve&5%281%29.1=&6%281%29.1=&7%281%29.1=&8%281%29.1=&10%281%29.1=&13%281%29.1=&14%281%29.1=&15%281%29.1=&20%281%29.1= where above finds First Name = Steve in sample database.

One other comment: You should be able to achieve this another way -- passing a parameter to a script to go to a record. IWP doesn't directly support passing a parameter in a URL, but you can do it anyway, by altering, say, iwp_home.html. You would then pass a parameter via a URL, say, http://localhost:81/fmi/iwp/res/iwp_home.html?hello=1 -- the javascript change you would make to iwp_home, would then extract this parameter from the URL using window.location.href , do a form post to log into the database, say, as Guest. Then the javascript would do another form post, to set a dummy FM field to the URL parameter, and finally a 3rd form post, to execute an FM script. The script would then use the value in the dummy field for a find or go to record command. This would require several successive POSTs. It would only execute if the parameter existed in location.href, so the DB list would display otherwise. This should afford more flexibility and allow passing multiple parameters in the URL. I tried this and it worked. Successive form posts must be do a dummy frame, so you won't lose focus.

Edited by Guest
Link to comment
Share on other sites

  • Newbies

Thanks. In answer to your questions, the data does need to be updated on the web and is dynamic/frequently updated.

I would be reluctant to go down the rout of lots of single record files, since if the idea works I will end up with masses of files which could be hard to manage.

In essence what I am trying to achieve is a URL redirection service, where the client can maintain a number of other fields with the redirection info. The fields could be changed regularly, as could the redirection info. Public users of the URL would be unaware of the re-direction service and login by clients would preferably be via a web form, rather than the Filemaker login dialogue.

The conventional way would probably be not with Filemaker, but since I am happy with FM, I’m checking out the possibilities.

Thanks.

Pip

Link to comment
Share on other sites

This topic is 5001 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.