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.

Getting current date into XML export

Featured Replies

I have several scripts that export XML in conjunction with an XSL style sheet to generate HTML. I would like at the top of each HTML file to have something like "(generated from the database on yyyy/mm/dd)" so that a viewer can easily tell how old the HTML data is that they're viewing (these are internal viewers only). The date of export is not in the XML that is exported (a surprise, that - seems quite a basic piece of info); for those of you familiar with XSL it will come as no surprise that XSL provides no built-in way to get current date; I have tried the xml-script element (to run javascript date functions) as well as the EXSLT date extension but apparently FMPro's built-in XML parser (Xalan) doesn't support either of these; I have tried creating a variable with today's date but (a) unless it's displayed on the layout I can't get it into the XML export and (: once it's displayed on the layout it doesn't automatically update to the current date every day. Any ideas? I know there has to be an easy way to do this...

Create an calculation field, Get ( CurrentDate ). Set its Storage to [x] Do not store (this is why your calculation does not update). Then export that. It does not need to be on the layout. Though you might want to.

  • Author

Thanks - but how do you export without it's being on the layout? When I set up the XML export I have a list of fields on the left to choose from. The date variable I set does not show up on this list. When I add it to the layout, it does show up on this list. What am I missing?

Edited by Guest
Clarity

This is a duplicate thread: http://www.fmforums.com/forum/showtopic.php?tid/191691/

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.