Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I am beginning in CDML.

I have figured out how to find records and get simple listed results very nicely.

Next task... in my Database I have a layout that displays the results of a find with sub summarized data that I want to emulate. Can you do such thing?

Posted

"I'm interested to see if anybody has a pure CDML method."

It is amazingly simple.

In my example you have but one subsummary field called subcost.

Ok. Go to your web layout. Place "subcost" on on that layout and format it as "Standard".

On your format file your action (form or link) should refer to the web layout and [fmp-field: subcost], just like displaying any other FMPro field.

I often recommend formatting fields in your web layout as "Standard". They work marvelously well as a field for receiving/displaying data from html formatted valuelists. These can the be set as FMPro valuelists in other layouts. Of course there are restrictions on the use of fmp-valuelists in db solutions such that a pop-up will display a mere 10 items, which kind of means that you cannot have a pop-up list on a FMP db for the 50 states. But you can in html.

Another reason to do the entire solution in cdml/html.

[ March 18, 2002, 04:47 PM: Message edited by: Keith M. Davie ]

Posted

I think the problem is, for example, if you have a database which records payments by people who have made more than one payment each. The web-page is then required to display each name once with an adjacent display of the total paid.

I have done this with cdml/Javascript. A pure cdml version may be more elegant.

All the best.

Garry

p.s. This is not a good example as I would use a portal to achieve this.

[ March 18, 2002, 06:03 PM: Message edited by: Garry Claridge ]

Posted

Here is a Javascript/CDML example:

code:


<script>var tot_cash = 0; var tot_cheque = 0; var tot_crcard = 0; var tot_all = 0;</script>

Shoot Date: [FMP-Field:sdate]

Location: [FMP-Field:location]

Photographer: [FMP-Field:photographer]

Cash:

[FMP-InlineAction: -db="rmr_payment.fp5", -lay="allfields", shoot_id={field:shoot_id}, pay_type="cash", -find]

[FMP-Record]

[FMP-Field:talent::fname] [FMP-Field:talent::sname] $[FMP-Field:pay_amount]

<script>tot_cash += [FMP-Field:pay_amount];</script>

[/FMP-Record]

[/FMP-InlineAction]

Cash Total: $<script>document.write(tot_cash);</script>

Cheques:

[FMP-InlineAction: -db="rmr_payment.fp5", -lay="allfields", shoot_id={field:shoot_id}, pay_type="cheque", -find]

[FMP-Record]

[FMP-Field:talent::fname] [FMP-Field:talent::sname] $[FMP-Field:pay_amount]

<script>tot_cheque += [FMP-Field:pay_amount];</script>

[/FMP-Record]

[/FMP-InlineAction]

Cheque Total:$<script>document.write(tot_cheque);</script>

Credit Cards:

[FMP-InlineAction: -db="rmr_payment.fp5", -lay="allfields", shoot_id={field:shoot_id}, pay_card="yes", -find]

[FMP-Record]

[FMP-Field:talent::fname] [FMP-Field:talent::sname] $[FMP-Field:pay_amount]

<script>tot_crcard += [FMP-Field:pay_amount];</script>

[/FMP-Record]

[/FMP-InlineAction]

Credit Card Total: $<script>document.write(tot_crcard);</script>

Day Total: $<script>document.write(tot_cash + tot_cheque + tot_crcard);</script>

I have removed most of the formatting for the sake of readability.

This summarises payments by payment type for a photographic shoot. The types being 'cash', 'cheque' and 'credit card'.

Garry

[ March 18, 2002, 06:28 PM: Message edited by: Garry Claridge ]

Posted

Sneddens - Can you give us an example of what you are trying to end up with?

Posted

I think portals could also be used for my payment type application. Three portals could be used; hence, three relationships. The contents of each portal/relationship determined by a concatenated key; (shoot_id & payment_type).

All the best.

Garry

Posted

wow....intriguing javascript. I do have a pure CDML/HTML solution that involves portals. It's a scheduling database, tracking competitions involving 8 schools and 20-some sports. Each record in the database is one contest. Hence, the need for subsummaries to display info by date. And not just that, but then sort by contests. For example, 4 schools could play 2 contests in 1 sport on 1 date. Headaches abounded in the construction, but in the end, I found the web solution more elegant than any Filemaker layout. here's the code for the search results page for the fall sports. If you want to try it out for real, let me know and i'll send the live link along (it's an open database, so don't ruin my life and show me how easy it is to hack into!!!)

<TABLE BORDER=0>

<TR>

<TD ALIGN=center>

<P></P>

</TD>

<TD ALIGN=center>

<P><FONT SIZE="+3"><B>Fall Ivy Schedule</B></FONT></P>

</TD>

</B></FONT><TD ALIGN=center>

<P></P>

</TD>

</TR>

</TABLE>

<IMG SRC="../../../Claris%20Home%20Page%203.0/assistants/images/stpl_bar.gif" WIDTH=520 HEIGHT=12 X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></CENTER>

<P>[FMP-RECORD]

<FONT SIZE="+1"><B><TABLE BORDER=0 CELLPADDING=0>

<TR>

<TD>

<P><FONT SIZE="+1"><B><TABLE BORDER=1 WIDTH="25%">

<TR>

<TD WIDTH=209 BGCOLOR="#CCCCCC">

<P><FONT SIZE="+1"><B>[FMP-FIELD: dayofweek ]</B></FONT><B>,

</B><FONT SIZE="+1"><B>[FMP-FIELD: date]<BR>

</B></FONT></P>

</TD>

</TR>

</TABLE>

</B></FONT></P>

</TD>

</TR>

<TR>

<TD>

<P><TABLE BORDER=1 WIDTH=780>

<TR>

<TD WIDTH=115 HEIGHT=6>

<CENTER><B>Football</B></CENTER>

</TD>

<TD ALIGN=center WIDTH=115 HEIGHT=6>

<P><B>Field Hockey</B></P>

</TD>

<TD ALIGN=center WIDTH=115 HEIGHT=6>

<P><B>Men's Soccer</B></P>

</TD>

<TD ALIGN=center WIDTH=115 HEIGHT=6>

<P><B>Women's Soccer</B></P>

</TD>

</B></CENTER><TD WIDTH=115 HEIGHT=6>

<CENTER><B>Men's CC</B></CENTER>

</TD>

<TD WIDTH=115 HEIGHT=6>

<CENTER><B>Women's CC</B></CENTER>

</TD>

<TD WIDTH=115 HEIGHT=6>

<CENTER><B>Volleyball</B></CENTER>

</TD>

</TR>

<TR>

<TD WIDTH=115>

<P>[FMP-PORTAL: Schedules]

<CENTER>[FMP-FIELD: Schedules::fball]</CENTER>

<P>

[/FMP-PORTAL]</P>

</TD>

<TD WIDTH=115>

<P>[FMP-PORTAL: Schedules]

<CENTER>[FMP-FIELD: Schedules::fh]</CENTER>

<P>

[/FMP-PORTAL]</P>

</TD>

<TD WIDTH=115>

<P>[FMP-PORTAL: Schedules]

<CENTER>[FMP-FIELD: Schedules::ms]</CENTER>

<P>

[/FMP-PORTAL]</P>

</TD>

<TD WIDTH=115>

<P>[FMP-PORTAL: Schedules]

<CENTER>[FMP-FIELD: Schedules::ws]</CENTER>

<P>

[/FMP-PORTAL]</P>

</TD>

<TD WIDTH=115>

<P>[FMP-PORTAL: Schedules]

<CENTER>[FMP-FIELD: Schedules::mcc]</CENTER>

<P>

[/FMP-PORTAL]</P>

</TD>

<TD WIDTH=115>

<P>[FMP-PORTAL: Schedules]

<CENTER>[FMP-FIELD: Schedules::wcc]</CENTER>

<P>

[/FMP-PORTAL]</P>

</TD>

<TD WIDTH=115>

<P>[FMP-PORTAL: Schedules]

<CENTER>[FMP-FIELD: Schedules::vball]</CENTER>

<P>

[/FMP-PORTAL]</P>

</TD>

</TR>

</TABLE>

</P>

</TD>

</TR>

</TABLE>

</B></FONT>

<HR>

[/FMP-RECORD]</P>

Posted

Thank you all for your replies. It will take me awhile to digest the responses!

I'm so grateful to this forum. I consistently get the answer I need (or find out that my question is wrong) within 24 hours.

Cindy

Posted

In my reply above I was not as clear as I should have been.

First, my example uses only one field.

Next, when the field(s) from the subsummary is(are) formatted as "Standard" in the web layout, place it(them) in the body of the layout. Do not create a subsummary part.

Finally, if that field does not display properly in your cmdl tag (e.g. a zero gets dropped following a decimal), you will need to create and refer to a calculation field equal to the subsummary field and such as to format the field for browser display.

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