Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Set all the fields of a given role (e.g. "1own") to a property setting (e.g. read only, hidden, required, etc.)

...

Parameters


Parameter

Type

Description

senderFieldPropertiesInBulkByRoleWrapper class of properties to be set up by role



FieldPropertiesInBulkByFieldName object


Parameter

Type

Description

RoleNameStringThe role to be used. All fields containing this role in the name will have the properties set up. E.g. "1own" will cover fields "1own.FName", "1own.MName", "1own.LName", "1own.Addr123", etc.
FieldVisibilityQFD.FieldVisibility

Sets the visibility of the field. Values:        

  • NotSet = -1       
  • NotSet = -1 None = 0       
  • Visible_No_Print = 1      
  • Hidden = 2       
  • Visible = 4
FieldReadOnlyQFD.FieldReadOnly

Sets the read-only level of the field. Values: 

  • NotSet = -1
  • NoRestrictions = 0
  • Read_Only = 1
FieldRequiredQFD.FieldRequired

Sets the required level of the field. Values:

  • NotSet = -1
  • NotRequired = 0
  • Required = 1
FieldMaskFlagBooleanIf true, the field will be masked (password field)
FieldFormatStringSets the format to be applied to the value of the field
FieldCalcOverrideBooleanIf true, calculations are not enabled for the field. Usually used with calculated fields, like FullName or Addr123
HiddenFieldBooleanIf true, the field will be a hidden input (input type = "hidden")
FieldBackgroundColorStringSets the background color of the field. E.g "#CCC", or "#AABBCC"



Sample Code

Dim objQFE As New QuikFormsEngine       


Code Block
languagevb
themeConfluence
Dim objQFE As New QuikFormsEngine       
Dim fieldProperties As New FieldPropertiesInBulkByRole() With {.RoleName = "2own", .FieldBackgroundColor = "#CCC"}

...


objQFE.

...

SetFieldPropertyByRole(fieldProperties)

...

 

...


 
Dim fieldProperties2 As New FieldPropertiesInBulkByRole() With {.RoleName = "1rep", .FieldCalcOverride =

...

 True}

...


objQFE.

...

SetFieldPropertyByRole(fieldProperties2)


Method overloads

Even though we strongly suggest using the method described above, the QuikFormsEngine includes old overloads for legacy implementations. The overloads are listed below and the idea is that the field properties are passed in as parameters instead of within a wrapper class.

...

Public Sub SetFieldPropertyByRole(FieldRole As String, FieldReadOnly As FieldReadOnly, FieldVisibility As FieldVisibility, FieldRequired As FieldRequired, FieldFormat As String, FieldMaskFlag As Boolean, FieldCalcOverride As Boolean, HiddenField As Boolean, FieldBackgroundColor As String)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldReadOnly As FieldReadOnly)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldVisibility As FieldVisibility)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldRequired As FieldRequired)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldFormat As String)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldFormat As String, FieldBackgroundColor As String)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldMaskFlag As Boolean)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldMaskFlag As Boolean, FieldCalcOverride As Boolean)
 

...


Code Block
languagevb
themeConfluence
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldReadOnly As FieldReadOnly, FieldVisibility As FieldVisibility, FieldRequired As FieldRequired, FieldFormat As String, FieldMaskFlag As Boolean, FieldCalcOverride As Boolean, HiddenField As Boolean, FieldBackgroundColor As String)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldReadOnly As FieldReadOnly)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldVisibility As FieldVisibility)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldRequired As FieldRequired)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldFormat As String)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldFormat As String, FieldBackgroundColor As String)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldMaskFlag As Boolean)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldMaskFlag As Boolean, FieldCalcOverride As Boolean)
 
Public Sub SetFieldPropertyByRole(FieldRole As String, FieldMaskFlag As Boolean, FieldCalcOverride As Boolean, FieldHiddenField As Boolean)