User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:adminmanual:businessmappings:field_dependency [2020/07/07 01:52]
joebordes [Examples]
en:adminmanual:businessmappings:field_dependency [2021/01/12 12:37] (current)
joebordes [Field Dependency Business Mapping]
Line 1: Line 1:
 ====== Field Dependency Business Mapping ====== ====== Field Dependency Business Mapping ======
  
-This type of map permits you to define dependencies between fields in edit mode. For example, it will permit you to make a field readonly ​(not editable) or not depending on the value selected in a given field or to change the available values in a picklist depending on the value.+This type of map permits you to define dependencies between fields in edit mode. For example, it will permit you to make a field read-only ​(not editable) or not depending on the value selected in a given field or to change the available values in a picklist depending on the value.
  
 The goal of this mapping is to define a set of rules/​conditions and actions to be applied while editing a field in a coreBOS form. The goal of this mapping is to define a set of rules/​conditions and actions to be applied while editing a field in a coreBOS form.
Line 40: Line 40:
 The actions supported are: The actions supported are:
  
-  * change : will assign a value or set of values to another field +  * change: will assign a value or set of values to another field 
-  * setoptions : will add selectable options in a picklist +  * setoptions: will add selectable options in a picklist 
-  * deloptions : will eliminate selectable options from a picklist +  * deloptions: will eliminate selectable options from a picklist 
-  * hide : hide a field and its’ label +  * hide: hide a field and its’ label 
-  * show : show a field and its’ label +  * show: show a field and its’ label 
-  * collapse : will collapse a block +  * collapse: will collapse a block 
-  * open : will open a block +  * open: will open a block 
-  * disappear : will hide a block +  * disappear: will hide a block 
-  * appear : will show a block +  * appear: will show a block 
-  * readonly : will make a field readonly +  * readonly: will make a field read-only 
-  * editable : will make a field not readonly +  * editable: will make a field not read-only 
-  * enable : will enable a field +  * enable: will enable a field 
-  * disable : will disable a field +  * disable: will disable a field 
-  * function : will call the given function with the parameters:+  * function: will call the given function with the parameters:
     * change_field,​ action_field,​ new_value, old_value, any additional parameters in XML     * change_field,​ action_field,​ new_value, old_value, any additional parameters in XML
  
 “Function” leaves the door open to all sorts of options, giving total control to the programmer. We will provide a set of common functions to be used: “Function” leaves the door open to all sorts of options, giving total control to the programmer. We will provide a set of common functions to be used:
  
-  * fieldDep_AssignNewValue : return new value in the action_field +  * fieldDep_AssignNewValue:​ return new value in the action_field 
-  * fieldDep_AddDays : add the given number of days to new_value and return the result +  * fieldDep_CopyFieldValue:​ copies the value in the field defined by the first parameter into the action field <​code> ​       <​function>​ 
-  * fieldDep_SubDays : subtract the given number of days from new_value and return the result +            <​field>​description</​field>​ 
-  * fieldDep_OnlyNumbers : return all numbers in new_value +            <​name>​fieldDep_CopyFieldValue</​name>​ 
-  * fieldDep_OnlyLetters : return all letters in new_value +            <​parameters>​ 
-  * fieldDep_GetField : use getFieldValuesFromRecord to retrieve the value of the given field +              <​parameter>​template_language</​parameter>​ 
-  * fieldDep_AssignUser : set the assigned user to the given (user) ID parameter +            </​parameters>​ 
-  * fieldDep_AssignGroup : set the assigned user to the given (group) ID parameter +        </​function>​ 
-  * fieldDep_AssignUserSelect : set the assigned user to the given user ID parameter for uitype 101 fields+</​code>​ 
 +  * fieldDep_AddDays:​ add the given number of days to new_value and return the result 
 +  * fieldDep_SubDays:​ subtract the given number of days from new_value and return the result 
 +  * fieldDep_OnlyNumbers:​ return all numbers in new_value 
 +  * fieldDep_OnlyLetters:​ return all letters in new_value 
 +  * fieldDep_GetField: ​will use getFieldValuesFromRecord to retrieve the value of the given field from a related record. In other words, this works on related capture fields in the record and retrieves information from the selected related record 
 +  * fieldDep_AssignUser:​ set the assigned user to the given (user) ID parameter 
 +  * fieldDep_AssignGroup:​ set the assigned user to the given (group) ID parameter 
 +  * fieldDep_AssignUserSelect:​ set the assigned user to the given user ID parameter for uitype 101 fields
   * **NOT IMPLEMENTED YET**   * **NOT IMPLEMENTED YET**
   * fieldDep_ChangeLabel:​ will permit changing the label of a field   * fieldDep_ChangeLabel:​ will permit changing the label of a field
-  * fieldDep_Format : return sprintf formatting of new_value (use sprintf javascript library: https://​github.com/​alexei/​sprintf.js)+  * fieldDep_Format:​ return sprintf formatting of new_value (use sprintf javascript library: https://​github.com/​alexei/​sprintf.js)