Changes

Jump to: navigation, search

Advanced Custom Fields

394 bytes added, 19:48, 26 September 2018
no edit summary
==Overview==
In this article, <!--you will add some additional [[Custom Fields|custom fields]] to the employee-->you will learn about <!--adding [[Custom Fields|custom fields]] to a [[Role|role]]-->three useful [[Custom Fields|custom field]] types. The These types of fields are widely used within [[SmartSimple]] and provide for versatile processing options.
* '''Calculated FieldFields''' – Executes Execute an expression to calculate a value and store the result in the field.
* '''Web Page View Field''' – Creates a document based on values stored in the underlying [[Entity|entity]] or entities.
* '''Upload - Multiple Files Storage Field''' – Stores a document either created through the [[Custom Field Type: Display Only – Special - Web Page View|Web Page View]] field or uploaded.
==Calculated FieldFields==
You can use arithmetic, string, comparison operators and functions within the calculated [[Custom Field|custom field]].
* '''PARSEFLOAT([Salary]) / 26''' – Divides the Salary by 26 to show a bi-weekly amount.
===Adding a Calculated FieldSee Also===1. Add a * [[Custom FieldType: Computed - Calculated Date]] * [[Custom Field Type named '''Total Compensation''' to the '''Compensation''' tab.: Computed - Calculated Number]]* [[Custom Field Type: Computed - Calculated Value]]
<!--===Adding a Calculated Field===
1. Add a [[Custom Field]] named '''Total Compensation'''to the '''Compensation''' tab.
2. Set the '''Field Type''' to '''Computed - Calculated Value'''.
The values are calculated and saved.
[[Image:Advc7.png]]-->
==Web Page View Field==
The [[Custom Field Type: Display Only – Special - Web Page View|Web Page View]] field provides the ability to display a fully formatted document or web page. In constructing this type of field, HTML is used in conjunction with variables.
<!--In this example you will create a simple letter of offer, displaying the employee’s name and address plus details of their compensation.
1. Edit the '''Letter of Offer''' field – currently set to a '''Link Upload - Single FileStorage''' field.
2. Change the '''Field Type''' to [[Custom Field Type: Display Only – Special - Web Page View|Display Only – Special - Web Page View]]. [[Image:Advc8.png]] The HTML Template is used to store the body of the document and will be a mix of HTML code, static text and references to fields associated with the underlying [[Entity|entity]] – in this case the [[User|user]] [[Entity|entity]] and the employee [[Role|role]].
[[Image:Advc8.png]]-->
The HTML Template is used to store the body of the document and will be a mix of HTML code, static text and references to fields associated with the underlying [[Entity|entity]].<!-- – in this case the [[User|user]] [[Entity|entity]] and the employee [[Role|role]].-->
===Basic HTML Tags Required===
The following basic HTML tags should be added to the '''Web Page View'''.
[[Image:Advc.png]]
1. <!--Add the following -->Below is a sample HTML Template:<br />[[Image:Advc1.png]]<br />The Variables are shown in bold.<br />
Note the use of the “me” variable to reference the current [[User|user’s]] details.
<!--
2. '''Save''' the template.
* There are no options available for this document as you have yet to enable them.
5. '''Close''' the window.-->
===Suppressing Missing Fields===
A special tag is used to suppress any fields that are missing from the underlying [[Entity|entity]] - [[Image:Advc2.png]]. Placing this tag in front of any field that may not be present will suppress the display of the variable name.
<!--1. Display the '''Web Page View''' [[Custom Fields|custom field]]. 2. Add this tag before the '''@salutation@''' field. [[Image:Advc3.png]]
2. Add -->For example, if we add this tag before the '''@salutation@''' field and Save:<br />[[Image:Advc3.png]]<br /><!--3. Save the '''Web Page View''' Field.
4. Display an '''Employee''' record.
5. Click the '''Open''' button on the '''Letter of Offer''' field.-->The '''@salutation@''' field is suppressed.<br /> <!--[[Image:Advc11.png]]--><!--6. '''Close''' the Window.-->
===Document Options===
You control which options are available to the [[User|user]] of each [[Custom Field Type: Display Only – Special - Web Page View|Web Page View]] field. Each of the selected options will add a button to the top of the [[Custom Field Type: Display Only – Special - Web Page View|Web Page View]] field. <!-- The following example shows how the field will look with all options enabled:
[[Image:Advc12.png]]-->
* '''Show Menu''' – check box that defines if a [[Menu|menu]] should be shown in the document window.
* '''Save to Multiple File Field''' – enables the [[User|user]] to save the document as an HTML document into any multiple file type fields in the related [[Entity|entity]].
* '''Save to Local Disk''' – enables the [[User|user]] to save a local copy of the HTML document.
<!--
1. Display the '''Web Page View''' [[Custom Field|custom field]].
The document can now be printed, saved and emailed as either a PDF or an HTML document.
6. '''Close''' the window.-->
==Using the Link – Multiple Files Storage Field==The final [[Custom Fields|custom field]] type will be the '''Multiple Files Storage Field'''Field. This field stores multiple files into a single field and is used to store:
* Uploaded documents.
* Documents that are created using the [[Custom Field Type: Display Only – Special - Web Page View|Web Page View]] type field using the '''Store to Server''' option.<!--
In this case the field will be used to store the letter you previously created, but can in fact be used to store any number of documents.
3. Set the field type to '''Multiple Files Storage'''.
[[Image:Advs13.png]]-->
===Multiple Files Storage Field Options===
* '''Keep Version''' – provides for version control over documents added. When a second document with the same name is added, the name will be appended with V_# (where # is the version number starting at 1).
* '''No DeletionDisable Delete''' – suppress the [[User|user’s]] ability to delete any files stored in the field and . The '''Manager PermissionAllow Delete Multiple Files Fields''' [[Manager Permissions|Manager Permission]] is required by the [[User|user]] to delete a – '''Allow Delete Multiple Files Fields'''bypass this restriction.
* '''Sort Order''' – files stored in the field can be ordered by '''File Name''', '''File Size''' or '''Update Date''' (descending).
* '''File Index''' – enables file indexing and full text searching on the embedded documents.<!--
1. Enable '''all the options'''.
If you were to create a second version of this file the name would be named V1_ and the file name.
-->
==See Also==
Smartstaff, administrator
421
edits

Navigation menu