Changes

Jump to: navigation, search
no edit summary
SmartSimple is continually becoming more robust and enhanced with new features. This sometimes results in the ability to configure the same end functionality through the use of a variety of different techniques. This article will discuss different ways that you can update a [[:Category:Custom Fields|field]] value to help you decide on the best approach for your situation.
 
 
==Default Text==
The simplest way to store a value into a field. This is configured through the custom field settings page for open text input fields such as [[Custom Field Type: Text – Single Line|Text - Single Line]]. This setting works by populating the input field on the form with the specified default value when a field does not already have a value stored in it. This requires the user to save the form to actually save the field value.
*Visibility (i.e. users can see the field and verify the default value before it is actually saved and stored into the field)
 ==[[Custom Field Type: Special – Calculated Value|Calculated Value Field]]==
A way to update a field based upon an expression that is run on page load. This applies only to the [[Custom Field Type: Special – Calculated Value|Special - Calculated Value]] custom field type. This setting is configured using [[:Category:JavaScript|JavaScript]] syntax and works by populating the input field on the form with the specified expression every time the form is loaded. This requires the user to save the form to actually save the field value.
===Advantages:===
==[[Value Stores To]]==
A way to duplicate a field value and store it into another field. This is configured through the custom field settings page. This setting works by duplicating a field value into another field any time the first field is saved. This requires the user to save a value into the first field.
==[[Template / Type Formula|Template Formula]]==
A way to update a field value behind the scenes. This is available in various areas and can be configured through the [[UTA]] settings page, [[:Category:Roles|User Roles]], or [[Client Categories|Company Categories]] pages. This setting is configured using MySQL syntax and works by directly updating the stored value of a field. This requires the user to save the form and runs after the form is saved, thereby referencing the latest field values that were saved.
===Advantages:===
*Ability to update different areas other than the form the user is directly on (i.e. a L2 formula can be used to update an L1 field).
*Server side validity (i.e. can be used for date/time functions to reference server time at exact time of saving)
*Complex calculations can be performed via MySQL syntax
*[[The Musings of Chin - SmartSimple's Order of Operations|Sequential processing ]] (i.e. saving an L3 results in L3 formulas, then L2 formulas, then L1 formulas to be run consecutively. Also within a template formula block, each individual line is processed consecutively thus allowing you to update a field value in one line, and then reference the new field value in the next line)
*Transparency (i.e. works behind the scenes)
 
==[[Workflow Task Types|Workflow Task]]: [[Update Custom Field Value|Update Custom Field]]==
A way to update a field value behind the scenes. This is configured as a task within a [[:Category:Workflows|Workflow]]. This requires the Workflow to be triggered against the object whose field you wish to update.
*Transparency (i.e. works behind the scenes)
[[Category:Chin’s Musings]] [[Category:Expert Tips and Tricks]]
526
edits

Navigation menu