Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

count function not showing using custom web


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

Recommended Posts

Posted

Using custom web publisher on FMP7 server advanced (windows).

After a web user submits the form the reply.xsl page shows their name and percent correct. The name is displayed fine but the percent does not show up. The percent field uses the count function. After playing around it looks like the the count function is the problem. Anybody have an idea why it will not display? Thanks!

Posted

Can you show the code around this count function?

Thanks, Martin

Thanks Martin

This code comes from the CDML conversion that comes with server advanced. Which unfortunately means most of it is a black box to me. Anyway here is a snippet. If this does not suffice I would be more than happy to send the whole xsl document laugh.gif

I also included the code for the lastname field which does work.

Again thank you!

Results for

<font size="+1" color="#000000"><b><xsl:value-of select="$default-record/fmrs:field[@name = 'firstname']/fmrs:data[1]"/>

<xsl:value-of select="$default-record/fmrs:field[@name = 'lastname']/fmrs:data[1]"/></b></font>

</td>

</tr>

<tr>

<td width="20%">

</td>

<td>

</td>

</tr>

<tr>

<td width="20%">

Percent Correct:

</td>

<td>

<font size="+1" color="#000000"><b><xsl:value-of select="$default-record/fmrs:field[@name = 'percent']/fmrs:data[1]"/>

%</b></font>

</td>

</tr>

Posted

Ah, now I understand. First I thought of the XPath count() function ...

For the first part: is the lastname field on your layout?

For the second part: Try to place the % character within

<xsl:text>%</xsl:text>

Martin

Posted

The lastname field is working (always has)

I removed the % completely from the percent snippet. I am still only getting a question mark "?" instead of a number there. Again thanks for your time...

I am new to posting here so not sure how things are done but I am editing something I just sent.

It looks like my problem has something to do with using a relationship. I used thd count function on fields that resided in the same database and there was no problem. So I guess I was going down the wrong path. Sorry. So now I guess the question changes to why can't i get a related field to show?

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