gary jones Posted November 12, 2000 Posted November 12, 2000 I have a problem reasoning my approach to the following, perhaps somebody has had experince of this or can see through the mist - as always help gratefully received. Sorry it's a bit long winded. I have a database of records and each record has a relevant category. These categories are applied to each record via a value list and sit in fields within the database, i.e. there's no external relationship invoked. What I'm trying to achieve via CDML is 1). a layout that summarises the number of records within each category by number. For example, Big Widget Companies (20) Little Widgets Companies (10) Where the words are dynamic links to listings of the companies. (Similar to the drill-down listings on Yahoo etc). 2). a layout that summarises the contents under a heading. For example, Big Widget Companies AtoZ Widgets Ltd Widget World Ltd Little Widget Companies Little Widgets Ltd Small Widgets Ltd Where the company names are dynamic links. Obviously, in FMP I could construct a report that features a sub-summary sorted by Company type and view in preview mode. I just can't seem to apply this idea to CDML. Thanks Gary
Vaughan Posted November 12, 2000 Posted November 12, 2000 Try using value lists to create the first "level" of headings. Make the value lists based on a field, that way they will automatically update themselves. The count of records could be done with a summary field, or a summary function (I'm not sure, try it and see). The "second level" of headings depend on the structure of your data. erhaps another value list can be used to generate these? What you are asking for is well within the limits of CDML, in fact there could be several ways of doing it. It's just a matter of working out which way will best suit your needs.
Simonpennington Posted November 15, 2000 Posted November 15, 2000 If you are using FMP5 you can use [fmp-inlineaction] tags to search your database and give back the results ie [fmp-inlineaction: -db=widget.fp5, -lay=all, big_widget="yes", -max=all, -find]<a href="fmpro?-db=widget.fp5&-format=detail.htm&-big_widget=yes&-find">There [fmp-if: currentfoundcount.eq.1]is[fmp-elseif]are[/fmp-if] [fmp-currentfoundcount] [fmp-if: currentfoundcount.eq.1]company[fmp-elseif]companies[/fmp-if] in the database.</a>[/fmp-inlineaction] This gives you the found amount in the search plus a link through to a detail page that would give the names of the companies not just the found amount. You can include as many as you want of these on the page. For your second example you would use the inline tag again but add the [fmp-record] tag ie: [fmp-inlineaction: -db=widget.fp5, -lay=all, big_widget="yes", -max=all, -find][fmp-record]<a href="[FMP-linkrecid: layout=all, Format=detail.htm][fmp-field: company_name]</a> [/fmp-record][/fmp-inlineaction] This would give you a list of names that matched your result and the [fmp-linkrecid] would take theuser through to a format page that would give a break down of that company. Unfortunately this only works on FMP5 and it does slow down the showing of the page as fmp5 does a search for each inlineaction on the page and then renders the page. I hope this helps. As I have said before this inline tag is very powerful and gives much better pages. I have a cv search site working where companies can set preferences and then when they access their individual page it automatically gives them the results of their preference searches and a link through to the cvs that match it. The inline tag basically says at this point in the page preform this search and show this information found within the cdml tags and when you get to the close tags start using the information that you had from the search that generated the page itself. If say my customer has set up a preference search and they log in. The cdml replacement tags in side my inlineaction tag are replaced with the user preferences. This only works by putting them in {} brackets not [] ie your customer says always show me on my page the big widget companies, you could have them fill out a preferences page that adds big widget companies in london to a field as a preference then on your page put the following code. [fmp-if: big_widget.eq.yes][fmp-inlineaction: -db=widget.fp5, -lay=all, big_widget="yes", area="{fmp-field: area}", -max=all, -find][fmp-record]<a href="[FMP-linkrecid: layout=all, Format=detail.htm][fmp-field: company_name]</a> [/fmp-record][/fmp-inlineaction][/fmp-if] This would search for big widget companies in London if that is what the customer has said they want and not show it if they don't. I hope this helps, If you can't understand anything please post. I have a tendency to lose my self when I explain things. Simon [This message has been edited by Simonpennington (edited November 15, 2000).]
Vaughan Posted November 15, 2000 Posted November 15, 2000 [FMP-InlineAction: ] is a feature of FMP 5 Web Companion. If you are using FMP 4 it is not an option.
gary jones Posted November 17, 2000 Author Posted November 17, 2000 Thanks Simon. I tried the inline action, which is a great feature. However, because some of my categories (I just used widgets in my request to make things simple) have over 200 sub-categories, the processing overhead is very high. I've decided to bin this idea but will use your help elsewhere. best wishes & thanks again. GARY
ivyorg Posted December 15, 2000 Posted December 15, 2000 I would like to display the info the same way as the previous poster (subsummary layout applied via CDML) but my FMP 5.0 hasn't arrived yet. Should I wait, or is there a way to do it in 4.1? Thanks Bevin
ivyorg Posted January 16, 2001 Posted January 16, 2001 Okay, I now have 5.0, but I can't figure out how inlines will help me with this problem. In my scheduling database, each sporting contest has its own entry. The necessary fields are date, matchup, and sport. In FMP, using portals and relationships, I have a summary layout which ends up sorting the info by date, and separating all the sports, so that it appears as follows: DATE 9.22.2001 --------- Football Soccer Volleyball H@B H@B D@Y D@Y H@B 9.23.2001 --------- Football Soccer Volleyball C@B H@PR P@COL The problem is displaying this summary info in CDML. I want the user to at least be able to display all dates in the database in one giant chart. Do I need to generate a script, which begins by doing a find a start date, then adding one day, finding the games on the next date, adding another day, and so on? The demo, which works for finding one date only, is located at rook.princeton.edu/newschedule, if anyone would be willing to look. Thanks. Bevin
Recommended Posts
This topic is 8780 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