Changes

Jump to: navigation, search

Custom Field Type: Special - Advanced Data Table

67 bytes removed, 19:12, 8 December 2016
no edit summary
=== Creating a Special - XML Data custom field ===
Typically XML Data custom fields are created for UTA level 1, 2 or 3, (example: e.g. a grant application) or they are created for organizations. To create a XML custom field:#Navigate to the desired place, where you want to create the XML custom field (example e.g. the UTA level 1).
# Click the '''New Field''' (+) button.
# For Field Type select '''Special - XML Data'''.
# Click '''Save'''.
# In the action bar click on the '''Section Builder''' button (it has four squares on it).
# Enter a '''Section Name''' (example: e.g. '''expense''').
# Click into the '''Section Node Name''' (the name auto populates. Note: '''Section Node Names''' are case sensitive).
# Enter '''Number of Rows''' desired.
# Click into the top row of the column labeled '''1'''.
# Enter a '''Display Name''' and a '''Node Name'''.
# If desired choose the '''Format''' (example: e.g. number, comma, date, currency, percent) and other settings for this column.
# Repeat for the remaining column headers.
# Click into the first cell in the row labeled '''1'''.
Note: you must replace '''SectionNodeName''' with the name you gave your section (example: e.g. '''@section.''expense''@'''), the section node name is case sensitive, and you must remove the html comments.
== Configuring the XML - Advanced ==
In the section builder you declare the formatting such as currency or numeric for specific columns as well as settings like precision. If you are collecting numeric or currency data you will likely want to do calculations on this information found within your XML (example: e.g. to sum the contents of column one, over two rows, enter '''=[1,1]+[2,1]''').
=== Adding a formula to a XML cell (working with data in the same section) ===
Example e.g. '''=[@section.''expense''.id@_''Total_Amount'']-[@section.''income''.id@_''Existing-funds''_''Amount'']'''
'''Validation Message''': Content that is displayed, when the validation script is not true (Example: e.g. Value must be greater than 100).
Examples:
Message: Please select a value.
'''Default Combo Box Value''' should be substituted with the default value you have configured, example e.g. '''--- Select One ---'''.
=== Validating values when saving record (SmartCheck, Submit Logic, Browser Script) ===
In addition to validating values when you save the XML worksheet you can also validate the XML worksheet when you save the record (example e.g. save a level 1 grant application).
When creating validation for an XML custom field use the '''Appear Mandatory''' option. Appear mandatory does not enforce the validation but will make the field look mandatory (add the asterisk and color) just like the mandatory option. Once you have checked '''Appear Mandatory''', validate the XML worksheet using one of the following validation methods, when the record is saved.
The XML custom field opens in a modal window and the user must click a button to launch the modal window and see the information entered. You can however, display the information entered into a '''Special - XML''' custom field on your object, such as a grant application, without requiring the user to click a button and launch the modal window. To do this we use the '''Read Only – System Variables''' custom field. The same syntax can be used elsewhere in the system (examples: e.g. include Display Only - Web Page View, Special MS Word Merge, visibility conditions, etc.) when referencing the xml values.
Specific currency formatting examples:
{| border="1"
|-
If you enable the '''Section Builder''' and check '''Apply Default Styles''' in each section of your XML custom field, the field will be automatically styled. If you have manually added CSS classes to your cells, you will need to remove those classes and check '''Apply Default Styles''' again and then click '''Build''' on your XML in section builder.
Administrators with CSS knowledge can modify the look and feel of their XMLs (Example: e.g. make columns wider or thinner). To modify the look and feel of your XML, create an external CSS style sheet, upload the style sheet to a SmartFolder, add classes to the elements in your XML, and add a link to the style sheet in your '''Special - XML''' or '''Read Only - System Variable''' custom fields.
==== Styling XML for Print ====
You can print your XML if you are displaying it in a '''Read Only - System Variable'''. Size your your XML to fit within 700 pixels wide (portrait) or 900 pixels wide (landscape) to avoid content cutting off, when a PDF is generated. If you have more than one section and more than a few columns, some of your content may cut off when printed if it is not sized. You will also notice columns between sections do not align. To fix this, we will use CSS in a SmartFolder and amend our '''Read Only - System Variable''', which is displaying the XML information.
Wrap the content in your read only system variable with a div and give the div a class. We do this to control the width. Wrap the section syntax in a div and give it a class. We do this so we can control the size of cells and the fonts. Example:e.g.
<pre><div class="xml700"><div class="xmlTitleBar">Title Bar Name</div><div class="xml3col">@xml.fieldname.sectionnodename.html@</div></div></pre>
Now create a CSS file. Example:e.g.
<pre>@charset "utf-8";
.xml3col .xmlCell.note {width:150px; min-width:150px; max-width:150px; font-size:12px} <!--Used to set one column to a larger size than the other cells--></pre>
Go to the desired SmartFolders and upload your CSS file. Use '''View URL''' to get the path to the CSS file. Then add the relative link back into your '''Read Only - System Variable'''. Example:e.g.
<link href="/files/427076/f114840/filename.css" rel="stylesheet" type="text/css" />
Add the class '''RightAlign''' to the desired cells in the section builder.
If you want to make one cell larger than the others, add a custom class to that cell in the section builder Example:e.g.
<pre>.xml3col .xmlCell.note {width:150px; min-width:150px; max-width:150px; font-size:12px}</pre>
'''Caption''': Used as a label or question before the field. If left blank, the Field Name will be displayed as the caption.
'''Caption Location''': Used to control the position and visibility of the caption. See examples Examples [[Label_Display_Options]]
'''Instructions''': Used to display text in the caption area. Instructions appear below the caption and are always visible unlike tool tips that appear on mouse over.
'''Appear Mandatory''': Used to make the field look like it is required without doing validation. This is used in conjunction with other validation methods such as SmartCheck, Submit Logic or Browser Script.
'''Track Changes''': Used to log changes to the field example: e.g. who updated the field when and what was the new and old values.
'''Enable Builder''': Used to create sections, define rows, columns, formulas and styles in your XML.
Smartstaff, administrator
4,478
edits

Navigation menu