Difference between revisions of "Visibility Condition"

From SmartWiki
Jump to: navigation, search
Line 2: Line 2:
  
 
'''Examples'''
 
'''Examples'''
1. To make the field visible after 06 February 2009.
 
  now()>'2009-02-06'
 
  
2. To make the field visible for a role # 9999
+
To make the field visible after 06 February 2009.
  ',@me.rolelist@,' REGEXP ',9999,' =1
+
now()>'2009-02-06'  
3. To make the field hidden for a role # 9999
 
  ',@me.rolelist@,' REGEXP ',9999,' = 0
 
4. More Examples,
 
  '@Destination City@'='Toronto'
 
  '@Type@'!='Contract'
 
 
 
'''Note:''' remember to include the @fieldname@ in single quotes.
 
  
For example, if you used the following '''Visibility Condition''':
+
To make the field visible only if the date in the field named '''Date Initiated''' is after 2009-01-31
*now()>'2009-02-06'
+
'@Date initiated@' >'2009-01-31'
The field will only be visible after 06 February 2009.
 
  
 +
To make the field visible for a role # 9999
 +
',@me.rolelist@,' REGEXP ',9999,' =1
  
These conditional statements can also refer to other fields:
+
To make the field hidden for a role # 9999
*'@Date initiated@' >'2009-01-31'
+
',@me.rolelist@,' REGEXP ',9999,' = 0
The field will only be visible if the date in the field named '''Date Initiated''' is after 2009-01-31
 
 
 
 
 
*'@Destination City@'='Toronto'
 
The field will only be visible if the entry in the '''Destination City''' field is '''Toronto'''
 
 
 
 
 
*'@status@' in ('Draft','Open')
 
The field will only be visible when the status is '''Draft''' or '''Open'''
 
  
 +
More Examples,
 +
  '@Destination City@'='Toronto'
 +
  '@Type@'!='Contract'
  
 
'''Note:''' remember to include the @fieldname@ in single quotes.
 
'''Note:''' remember to include the @fieldname@ in single quotes.
Line 37: Line 23:
  
 
Access to [[Custom Fields]] can also be controlled using [[Role Field Permissions]] and [[Status Field Permissions]]
 
Access to [[Custom Fields]] can also be controlled using [[Role Field Permissions]] and [[Status Field Permissions]]
 +
  
 
[[Category:Custom Fields]]
 
[[Category:Custom Fields]]

Revision as of 15:13, 22 May 2009

The Visibility Condition section of Custom Fields and Standard Fields allows you to use logical statements to determine whether a field is visible or not.

Examples

To make the field visible after 06 February 2009.

now()>'2009-02-06' 

To make the field visible only if the date in the field named Date Initiated is after 2009-01-31

'@Date initiated@' >'2009-01-31'

To make the field visible for a role # 9999

',@me.rolelist@,' REGEXP ',9999,' =1

To make the field hidden for a role # 9999

',@me.rolelist@,' REGEXP ',9999,' = 0

More Examples,

  '@Destination City@'='Toronto' 
  '@Type@'!='Contract'

Note: remember to include the @fieldname@ in single quotes.


Access to Custom Fields can also be controlled using Role Field Permissions and Status Field Permissions