Changes

Jump to: navigation, search

Custom Field Type: Special - Advanced Data Table

211 bytes added, 13:32, 3 June 2016
Variables
==Variables==
===Access to the data within an entire XML section===
Uses standard SmartSimple variable references.
To display the section when there are no variables references within the section itself::<font size=3>@xml.fieldname.sectionname.html@</font> To display the section when there are variables referenced within the section itself::<font size=3>@xmlpre.fieldname.sectionname.html@</font>   ===Access to the data within the XML field uses ===  Uses standard SmartSimple variable references.
:<font size=3>'''@xml.'''''field name.parentnodename.nodename'''''.nodevalue@</font>
===Formatting node values:===
:<font size=3>'''@xml.'''''field name.parentnodename'''''.[# ~comma('''''nodename'''''.nodevalue)~ #]@</font>
:* This will return a numeric nodevalue in currency format. (See also [[Displaying_a_Number_Value_as_Currency#XML_data|Displaying a Number Value as Currency]].)
===Date formatting node values===
To display the section::<font size=3>@xml.fieldname.sectionname.html@</font>:<font size=3>@xmlpre.fieldname.sectionname.html@</font> - This will process variables that are referenced in the section Date formatting node values: The available syntax for date formats are as follows: ~formatdate(Date.nodevalue)~ >> returns the date in the user's date format ~year(Date.nodevalue)~ >> returns the year from the date ~month(Date.nodevalue)~ >> returns the month from the date ~monthname(Date.nodevalue)~ >> returns the month name from the date ~day(Date.nodevalue)~ >> returns the day from the date ~dayweek(Date.nodevalue)~ >> returns the day of week from the date
''Examples'':
DAYWEEK: Tuesday
===Counting nodes:===
:<font size=3>'''@xml.'''''field name.parentnodename.nodename'''''.nodecount@</font>
===For child records:===
:<font size=3>'''@xml.'''''fieldname.nodename'''''[# ~nodevalue~ ~attributes('''''attribute name''''')~ #]@'''''</font>
:<font size=3>'''@xml.'''''fieldname.nodename'''''[# ~'''''childnodename'''''.nodevalue~ ~'''''childnodename'''''.attributes('''''attribute name''''')~ #]@'''''</font>
===To return the actual XML code from the field:===
:<font size=3>'''@'''''fieldname'''''.xmlvalue@'''</font>
Smartstaff, administrator
4,478
edits

Navigation menu