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:globalvariables [2018/08/01 18:12]
mikel [NOTE]
en:adminmanual:globalvariables [2019/08/30 13:10] (current)
Line 29: Line 29:
   * **Value**. Is a string field that holds the actual value to be used for this variable. Each variable has its own possible values which are documented in the module. There is a special value accepted by all variables which is **[Use Description]**. Some variables have very long values, for example __Application_UserLoginIPs__ can be a long string of values. To make maintaining these long values easier you can put the value in the description field instead of the value field by setting the value to **[Use Description]**.   * **Value**. Is a string field that holds the actual value to be used for this variable. Each variable has its own possible values which are documented in the module. There is a special value accepted by all variables which is **[Use Description]**. Some variables have very long values, for example __Application_UserLoginIPs__ can be a long string of values. To make maintaining these long values easier you can put the value in the description field instead of the value field by setting the value to **[Use Description]**.
   * **User**. the user this variable is for   * **User**. the user this variable is for
-  * **Default**. This check box is the contrary to Mandatory. It permits the administrator to set a default value for all users but it can be overridden by any user who wants to have a different value. The record marked as Default will only be used if no other record is found +  * **Default**. This checkbox ​is the contrary to Mandatory. It permits the administrator to set a default value for all users but it can be overridden by any user who wants to have a different value. The record marked as Default will only be used if no other record is found 
-  * **Mandatory**. This check box forces the value of the variable for all users. If it is checked no other record for this variable will be used. It is designed for the administrator to be able to set a variable globally for all users. To accomplish this you must set the module to private sharing and assign the record to the admin user so it can't be modified by any user.+  * **Mandatory**. This checkbox ​forces the value of the variable for all users. If it is checked no other record for this variable will be used. It is designed for the administrator to be able to set a variable globally for all users. To accomplish this you must set the module to private sharing and assign the record to the admin user so it can't be modified by any user.
   * **Blocked**:​ this field is simply for grouping certain variables together, it has no logic nor process associated. The use case this field was created for was for the admin user to be able to hide it in all profiles or not permit editing of the field so he can use it to group certain important variables together. Once those variables are ticked we can easily create a filter or search on the field so we can find them quickly.   * **Blocked**:​ this field is simply for grouping certain variables together, it has no logic nor process associated. The use case this field was created for was for the admin user to be able to hide it in all profiles or not permit editing of the field so he can use it to group certain important variables together. Once those variables are ticked we can easily create a filter or search on the field so we can find them quickly.
 +
   * **Module and In Module List**. Variable values can be applied per module with these two fields. If the in module list field is checked then the defined value will be applied only to the modules selected in the module multi-picklist field   * **Module and In Module List**. Variable values can be applied per module with these two fields. If the in module list field is checked then the defined value will be applied only to the modules selected in the module multi-picklist field
-  * **Role**. Select the roles you want to apply this variable to.+  * **Role**. Select the roles you want to apply this variable ​too. **If one or more roles are selected the Global variable MUST be assigned ​to a user in one of those rolesTo help you with that coreBOS will automatically assign it to one if you haven'​t**
   * **Business Map**. When we look for business maps in the code we do that through the global variable module instead of going directly to the business map module. This way we permit any user to override the default selection and set a specific mapping for any case.   * **Business Map**. When we look for business maps in the code we do that through the global variable module instead of going directly to the business map module. This way we permit any user to override the default selection and set a specific mapping for any case.
   * **Category**. simply for organization purposes, so you can group and filter your variable records   * **Category**. simply for organization purposes, so you can group and filter your variable records
 +
 +
 +
 +
  
  
Line 58: Line 63:
 You can see an [[https://​github.com/​tsolucio/​coreBOSwsDevelopment/​blob/​master/​testcode/​500_GetGlobalVariable.php|example of this call and try it out]] using the [[https://​github.com/​tsolucio/​coreBOSwsBrowser|coreBOS web service developers'​ tool]]. You can see an [[https://​github.com/​tsolucio/​coreBOSwsDevelopment/​blob/​master/​testcode/​500_GetGlobalVariable.php|example of this call and try it out]] using the [[https://​github.com/​tsolucio/​coreBOSwsBrowser|coreBOS web service developers'​ tool]].
  
 +This web service endpoint has a special use case to **retrieve business maps**. Since [[en:​adminmanual:​businessmappings:​|business maps]] are such a powerful configuration feature and the exact map to use for each user/module depends on the global variable module escalation rules, this web service method will recognize the prefix "​**BusinessMapping_**"​ in the first gvname parameter. If the name has this prefix it understands that you are searching for a Business Map and will return the ID of the map along with the map itself in JSON format.
  
 +<​code>​
 +SearchGlobalVar('​BusinessMapping_Accounts_FieldDependency',​ '',​ '​Accounts'​);​
 +array(
 +  '​id'​ => business map WSID,
 +  '​map'​ => JSON string of the map,
 +);
 +</​code>​
 ===== JavaScript ===== ===== JavaScript =====
 In the browser we have a **JavaScript promise** that sets the value obtained from the application like this: In the browser we have a **JavaScript promise** that sets the value obtained from the application like this:
Line 87: Line 100:
 ===== More Information ===== ===== More Information =====
  
-[[http://​blog.corebos.org:8080/en/​blog/​globalvariable|You can find some more information here]]+[[http://​blog.corebos.org/​blog/​globalvariable|You can find some more information here]]