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.

Help with field result

Featured Replies

Hi Guys,

I've been trying to get to grips with XML, by downloading the various examples from XML Central and reading the guide FMP 6 Developer Guide to XML/XSL by Beverly Voth. Im stuck on a very small thing, which any one with real xml experience will find very easy to answer.

Ive got my code listed below:

Im exporting fields A through to Z, where the Z field (position() 26) contains a colour value. The data might say Yellow, Red, White etc.

My question is, how do I alter my line 3 to check the value of the field and call the necessary coloured variable.

I have created variables underneath my stylesheet which I would like to call from the above code, ill just give yellow as an example:

#FFFF99

Any help will be much appreciated

Many Thanks

Instead of using long lists of variable definitions and or statements, it's better to use an external translation table where the individual translation color --> hex RGB value can be looked up with an XPath. You gain a lot of flexibility, and the code is very short and efficient.

See the attached example how this works.

colors.zip

  • Author

Thankyou very much Martin,

Your example helped me in more ways than you think. Its further enhanced the my limited knowledge of stylesheets and how they are constructed...

One thing I dont quite understand - (and Im only a beginner - only spent around 28 hours, reading and doing examples), when I define a variable I use a . In your example you dont....the code works, but why do .

Can you recommend any further "basic" books I can increase my knowledge on this subject with the use of FileMaker - especially with MSOFFICE.

Many thanks once again

Jalz

  • Author

Hi Martin,

I've been developing the example you gave me and I've finally achieved the result I wanted (in html format). I need to export data from another TO, and Im fairly confident that I can create a stylesheet to get that to present in the format I'd like. Is it possible, when I do the second export, to "merge" the results of the first xlst result?

Yes, export the first TO as XML (or transform it to another XML format, also possible).

When exporting the second TO, use a stylesheet that loads the first XML TO with the document() function. Then you can transform both XML trees and merge them.

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.