[Settings]
WindowTitle=Personnel SQL Data Import
DsnName=nv_groups
DatabaseTable=GROUP_DATA
DatabaseUser=NVUSER
DatabasePassword=NVM

;Maximum retries if connection failed. If failed the module waits for 10 seconds before retrying
MaxConnectionRetries=30

;Alarm to start if an error occured. (Database connection failed)
StartAlarmOnError=9845

;Range of dynamic groups to import
GroupNumberRangeFrom=900
GroupNumberRangeTo=902

;Optional regular expression to modify the read group name from nvgroups.dbf before using it has a placeholder <GROUPNAME> for the select command
GroupNameRegExp=
GroupNameLayout=\1

;Activate with 1 to write extended log files
ExtendedLogs=0

PersSelectCommand=SELECT * FROM <TABLE> WHERE GROUPNAME='Test'

;Start additional NVE module after the import has finished
StartAdditionalModuleAfterImport=

;Start additional command after the import has finished
StartAdditionalCommandAfterImport=


;Flag 0 or 1 to update personnel database ‘nvpersonal.dbf’ with imported data for the Personnel Editor. Is time consuming.
UpdatePersEditDb=0

;Start the personnel editor to generate the alarm group databases after the import. This should only be used, if the UpdatePersEditDb flag is set.
CreateAlarmGroupDbsAfterImport=0

DoNotImportGroupIfNotFoundInSql=0

;Remove specified chars from the read phone number value
RemoveCharsFromPhoneValue=/\

;Activate all imported group at the end of the import in one go instead of after each group import
RenameAllGroupsOnEnd=0

;Create groups in temporary dynamic group sub directory and rename after import. Simultaneous activation of all dynamic groups.
CreateGroupsInDynamicDirectory=1


;Specify waht is read from which fields in the SQL database
[DbFieldNames]
PersName=NAME
PersFirstName=
PersId=ID
PersNumber=INDEX
PersAdditonalInfo=
PersDepartment=DEPARTMENT
PersLanguage=LG
PersValue1=PHONE1
PersValue2=PHONE2
PersValue3=PHONE3
PersValue4=PHONE4
PersValue5=
PersValue6=
PersType1=
PersType2=
PersType3=
PersType4=
PersType5=
PersType6=

;SQL Select query definition to get group data
[GroupSelectCommand]
DefaultSelectCommand=SELECT * FROM GROUP_DATA WHERE GROUPNAME='<GROUPNAME>'
;900=SELECT * FROM GROUP_DATA WHERE GROUPNAME='<GROUPNAME>' AND DEPARTMENT='Tech'
900=

;Template to define what values are written in which dbf group field
[DefaultDbEntryTemplate]
Entry1_Name=<PERSNAME>
Entry1_Department=Polizei <DEPARTMENT>
Entry1_ValueForPhone1=1
Entry1_PhoneType1=EXT
Entry1_ValueForPhone2=2
Entry1_PhoneType2=INT
Entry1_ValueForPhone3=3
Entry1_PhoneType3=DCT

Entry2_Name=SMS <PERSNAME>
Entry2_Department=Polizei <DEPARTMENT>
Entry2_ValueForPhone1=4
Entry2_PhoneType1=SMS

;Assign specific group template for specified groups 
[AssignGroupTemplate]
901=SMS_Only
91x=

;Example of specific group template
[DbEntryTemplate_SMS_Only]
Entry1_Name=SMS <PERSNAME>
Entry1_ValueForPhone1=1
Entry1_PhoneType1=SMS

;Convert read types to NV conform phone types
[TypeConversion]
DefaultType=

[ValueConditions]
Active=0
OnlyUseValue5IfValueEmpty=
IfFalseReplaceValue5WithValue=
OnlyUseValue5IfValueNotEmpty=


