Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

count function not showing using custom web

Featured Replies

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!

Can you show the code around this count function?

Thanks, Martin

  • Author

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>

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

  • Author

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?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.