April 20, 200421 yr I want to do a search using address bar CDML syntax to try and get a list of records in a database that *aren't* duplicates. I've been trying to find a way to accomplish what I want by creating a value list and having the values based on the field, as in the value list the items only appear once. But it means I cannot then sort the records by reverse date. Basically I'm working on a FileMaker news posting solution and want to display an archive listed in the format 'month name - year number' I've created the 'month name - year number' field but obviously if there are 70 posts in a month, I don't want it to show... April 2004 April 2004 April 2004 April 2004 April 2004 April 2004 and so on. Just once is enough. Also they must be sorted by reverse date so the most recent month and year is at the top, with the previous years listed below. Then I can easily convert each of those items in the archive page into a search to find all the posts in that month. Just trying to find a way to make the archive automatic. So when the first post of the new month is made, the new month eg May 2004 is listed automatically on the page. So what I thought might be possible was a way to search for duplicates, as using -Op=bw will allow me to use ! on the field - but then I somehow need to show the omitted in the browser, rather than the duplicates. Any ideas? I've already posted this a couple of times to comp.databases.filemaker but thought I'd try here to see what anyone else thinks. FileMaker Version: Server 5 Platform: Windows 2000
April 20, 200421 yr The way I do this is with Javascript, you will need to post-process the "found set". Note that the data needs to be sorted!!! <script> current_value = ""; [FMP-Record] if ("[FMP-Field:mthyear]" != current_value) { document.write("[FMP-Field:mthyear]"); current_value = "[FMP-Field:mthyear]"; }; [/FMP-Record] </script> Hope this helps. Garry
April 20, 200421 yr Author That's superb!!! Thankyou very much! I didn't think of using JavaScript. JavaScript and CDML could be an extremely powerful force! Thanks again FileMaker Version: Server 5 Platform: Windows 2000
Create an account or sign in to comment