January 6, 200224 yr Now that I got the Instant Web Publishing solved, I am ready to take the next step... how in the world do I make html codes that connect to FMP database.. does any one have a working file (sample) that I could analyse and then try my own stuff?? I am familiar with HTML and also I have FrontPage2000
January 6, 200224 yr Firstly you need to query the database. This can be done in one of two ways: URL: http://nnn.nnn.nnn.nnn:nnn/FMPro?-db=dbname.fp5&-lay=weblay&-format=page1.html&lastname=smith&-find or HTML: <form action="http://nnn.nnn.nnn.nnn:nnn/FMPro" method="post"> <input type="hidden" name="-db" value="dbname.fp5"> <input type="hidden" name="-lay" value="myweblay"> <input type="hidden" name="-format" value="page1.html"> Enter Name:<input type="text" name="lastname" value=""> <input type="submit" name="-find" value="Find Name"></form> You will need to have a Layout(myweblay) in your database which displays the fields you intend to use. The query then calls a format file (page1.html), which may look like this: <body> [FMP-Record] [FMP-Field: firstname] [FMP-Field: lastname] [FMP-Field: address]<br> [/FMP-Record] </body> The format file will loop through, and display, any found records. Hope this helps to get you started. Garry
January 6, 200224 yr Author Thanks, I appreciate your help... I will go and try that and come back with a question if I have one (LOL.. IF?? .. let's say.. when I have one) BTW... the nnn.nnn.nnn, does it refer to the path in web address?? like if I had a test site in geocities.. would it mean www.geocities.com/testsite?? or does it refer to the ip numbers? Thanks
January 6, 200224 yr Author Thanks once again Garry. After a few trials and avariations, I am able to querry the database I guess I can attempt other things now I like what you just showed me, coz it means I can actually have the database there and people could querry it and get results that they can print or view, which is all I want to do for now. I do not want to give them access to modifying, or edditing any records That answers my own questions about what the nnn.nnn.nnn.nnnn meant now I know Thank you very much
January 6, 200224 yr Are you asking about CDML and how to use it to link FMP in to your own custom webpages? Cheers,
January 6, 200224 yr Get a copy of the CDML reference -- from the FileMaker web site, under downloads. Then get a copy of Home Page 3. It's NLA but the trial version can stiull be found if you look hard enough around the web. Use HP3's FileMaker Connection Assistant to build a basic set of custom format files. Look at them, see how they work, then change them to suit.
January 6, 200224 yr Author Tokyo-B, Yes thats exactly what I want to do. I have been able to querry records (based on suggestions given here yesterday), but only about 25 results show in each page, I would like to know now.. how to get single page results for each record and to navigate between the found set of records or at least to be able to show either all the found records or give option to the searcher to go to the next page that has more results (the thing is I do not know if there is a next page generated or not) Vaughan B, Thanks, I will surely go and do a little search Thanks I have already downloaded the CDML tool, but it left me with more questions than answers. So I will go and look at the ohter things you mentioned, thanks.
January 7, 200224 yr CDML reference is a must. The 25 is default number of records returned. From CDML database: code: What it does Specifies the maximum number of records that should be returned per page. Value is A number from 1 thru 2147483647, or the word "All". The default value is 25. Syntax example(s) Specify the maximum number of records using a link <a href="FMPro?-DB=Contacts&-Format=format.html&-Max=10&-FindAll">First 10 Records</a> Specify the maximum number of records using a form action <form action="FMPro" method="post"> <input type="hidden" name="-DB" value="contacts.fp5"> <input type="hidden" name="-Format" value="format.html"> <input type="hidden" name="-Max" value="10"> <input type="submit" name="-FindAll" value="First 10 Records"> </form> Other tags that are required -DB, -Format, -Find or -FindAll See also -Skip
January 7, 200224 yr Author Thank you very much Anatoli, Honestly I was gonna personaly send a question to you earlier. I noticed you were around every where giving answers and I could not afford not having your valuable input to my questions. But you got here finally. Thanks.. code copied to text file which I will work with an an hours time.
January 7, 200224 yr Author Anatoli! Perfecto... it worked great Now I will try and look up the omit option because there are so many records that should not show up since they are not needed. Just to enlighten you, I have a database for our cemetery where I live. The database is in FMP and I want it available to any one interested to be able to see who is buried there. However, the database has records of the cemetery in total, every single grave and grave plot is counted. Some of them are not occupied or even reserved. I do not want these to show up. Some plots are reserved (people are still living), I do not want these to show up either. In other words I want only the records that have 'deathdate' to show up when some one searches a section of the cemetery or the whole cemetery. At this point all I am interested in doing is making the data available to the visitors, they should not be able to edit any information. Anatoli::: Thanks for the code again BTW: I'mjust doing this as a charity act. And when I say our cemetery, I do not mean that we own it, but rather it is the cemetery in the town that I live in.
January 7, 200224 yr First -- get the CDML database. Second -- you'll not omit; you must do the opposite -- find. That will omit the records that you'll not need. Again from CDML reference: code: -Find What it does Submits a search request using defined criteria. A format file is used to display the records found. A Web user must have Browse permission in order to execute this action. You can improve the perceived performance of your Web database by using the -Max tag to limit the number of records returned. Syntax example(s) Find a record using a link <a href="FMPro?-DB=db.fp5&-Format=rslt.htm&country=USA&-Max=1&-Find">Find first USA record</a> Find some records using a form action <form action="FMPro" method="post"> <input type="hidden" name="-DB" value="names.fp5"> <input type="hidden" name="-Format" value="results.htm"> <input type="hidden" name="-Max" value="all"> <input type="text" size=12 name="Country" value="USA"> <input type="submit" name="-Find" value="Find Records"> </form> Other tags that are required -DB, -Format, field name See also -Max, -Skip
January 7, 200224 yr Author Thanks once again Anatoli Hmmm.. that's rather interesting way of doing things! Anyway, code copied to text file, will work with it within an hour. Will post tomorrow about results ) --------------this is my current code---------- <FORM ACTION="http://localhost:591/GCProject/FMPro" METHOD=POST> <INPUT TYPE="hidden" NAME="-db" VALUE="gcgraves 1.2.fp5"> <INPUT TYPE="hidden" NAME="-lay" VALUE="GCDB Online Form"> <INPUT TYPE="hidden" NAME="-format" VALUE="GCDBresultview.html"></P> <P> First Name: <INPUT TYPE=text NAME="First Name" VALUE="" SIZE=30></P> <P> Second Name:<INPUT TYPE=text NAME="Middle Name" VALUE="" SIZE=30></P> <P> Last Name: <INPUT TYPE=text NAME="Last Name" VALUE="" SIZE=30></P> <P> Section: <INPUT TYPE=text NAME=Section VALUE="" SIZE=30></P> <input type="hidden" name="-Max" value="1000"> <INPUT TYPE="submit" NAME="-find" VALUE="Find"> </FORM> -----------------------end of code----------------- do you still think I need to use the code you just gave me? or do I need to use -skip at this time? Thanks [ January 07, 2002: Message edited by: kulmansam ]
January 8, 200224 yr Author Right now, my results file displays all the found set of records (in this case max is set to 1000. Is there a way that I could make the results file only display 1 record or only 5 records, then I can have a link or button to display the next found set? Next 1 record or next 5 matching records. If that is possible then I can have something that looks like my database and functions more like my database, while in reality it only querries my database Any suggestions?
January 8, 200224 yr You really need the CDML reference database. Search this forum for link to it or www.filemaker.com site.
January 8, 200224 yr Author Please ignore my question about navigation. The CDML tool from FMP site is quite useful. Now I can view any number of records at a time I have it set to 10 records, then navigation at the bottom of the page says (First Page, Previous Page OR Next Page, Last Page) I still need to find out a way to skip (magic word), records. For example I do not want to show records that do not have death dates! Any guidance appreciated Thanks.
January 8, 200224 yr Author Sorry Anatoli, I had not seen your message because I did not refresh the page before my last post. Thanks for your advice. The thing is I do have the CDML tool, but it did not make sense. Thanks to the codes given by you and Garry in here, NOW I can understand and actually its working great Thanks a lot. I will try to find out about skipping records I do not want before I go to sleep.
January 21, 200223 yr Anatoli's advice is good: don't omit records, FIND the records you want to view. In your case I think you want records WITHOUT a death date. One way to do this is to create a calculation field in the database -- lets call it DDCheck. Make the calculation insert a "1" into the field if the death date is empty, otherwise leave the field blank. It coud be... code: If ( IsEmpty (DeathDate), 1, "") Now you need to create a "canned" find for all the records with DDCheck=1. This could be: http://www.site.com/path/FMPro?-db=database&-lay=web&-error=error.htm&-format=results.htm&DDCheck=1&-find Use the CDML Reference database to look up the syntax for the -Find action.
Create an account or sign in to comment