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.

Featured Replies

Hello all you XML junkies.....

Hoping someone can give me a rundown on the following. I have a simple form that when submitted an email is sent out to the address that I specified in the script. Instead I would like the email to go to the user who has submitted the form. Each user has a unique login that is set up in FM accounts and Privleages. Any clue where to start on this. I am an advanced filemaker user but a newbie with this xml stuff.

here is the current code....

xsl:variable name="email_status" select="fmxslt:send_email('[email protected][email protected]&subject=Music Connection has received your edited BOM',

concat('Music Connection has received your edited BOM.',' ',' ','Date:',$bz/fmrs:field[@name='Date']/fmrs:data[1],$firsthalf,$secondhalf))"/

thanks for the help

Well, this is a double problem. I didn't test all of that, but let's try:

First part: The e-mail addresses in your script must be stored in a table.

Create a table users with fields accountname and email_address and transfer the info in your script there. Create a layout WWW_users that holds your table.

Second part: You can query now this info inline in the XSLT.

According to the FMS7A CWP Guide, p. 56, the client user name is stored in the parameter client-user-name. You find a lot of tricks used here on p. 56 and on the next page. With the user information and the document() function, you can first the XML tree in fmresultset grammar in a variable userdata, and then extract the email address of it and store it in a variable email. Then you just have to modify your fmxslt:send_email function with $email.

So you would have something like:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" ...>

.

.

<xsl:param name="authenticated-xml-base-uri"/>

<xsl:param name="user-client-name"/>

<xsl:variable name="userdata" select="document(concat($authenticated-xml-base-uri,'/fmi/xml/fmresultset.xml?-db=yourdatabase&-lay=WWW_users&accountname=',$user-client-name,'&-max=1&-find'))"/>

<xsl:variable name="email" select="$userdata/fmrs:fmresultset/fmrs:resultset/fmrs:record[1]/fmrs:field[@name = 'email_address']/fmrs:data[1]"/>

.

.

<xsl:template match="...">

and then somewhere here your fmxslt:send_email(....

Make sure that the parameters are defined before <xsl:template ...>

I hope I haven't entered some typo as the last time

smirk.gif

Martin

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.