Difference between revisions of "Appendix: Keywords"

From 1Archive help
Jump to: navigation, search
 
(3 intermediate revisions by one other user not shown)
Line 16: Line 16:
 
== List of keywords ==
 
== List of keywords ==
  
On several objects, keywords can be used on all the fields in the system.
+
A keyword can be used to automatically fill in the value of a field inside a template. They are always constructed in the same way: '''#{FIELDNAME/FUNCTION, PARAMETERS}'''.<br/>
 +
All available fields of a document can be used. See the table below for examples.<br/>
 +
 
 +
<br/>{{Warning|When an incorrect keyword is given, an error will occur when the template is applied.}}<br/>
 +
{{warning|The keywords are case sensitive, you have to enter the upper case code of the field (not the name!)}}<br/>
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 34: Line 38:
 
|-
 
|-
 
|
 
|
|SUPPCODE
+
|
 
|NAME
 
|NAME
 
|
 
|
Line 55: Line 59:
 
|-
 
|-
 
|
 
|
|CUSTCODE
+
|
 
|NAME
 
|NAME
 
|
 
|
Line 76: Line 80:
 
|-
 
|-
 
|
 
|
|JOURNAL
+
|
 
|NAME
 
|NAME
 
|
 
|
Line 83: Line 87:
 
|-
 
|-
 
|
 
|
|INVOICENR
+
|INVNR
 
|
 
|
 
|
 
|
|#{HEADERFIELD(INVOICENR)}
+
|#{HEADERFIELD(INVNR)}
 
|001201600424
 
|001201600424
 
|-
 
|-
Line 139: Line 143:
 
|-
 
|-
 
|
 
|
|CURRENCY
+
|
 
|NAME
 
|NAME
 
|
 
|
Line 153: Line 157:
 
|-
 
|-
 
|
 
|
|YEAR
+
|
 
|NAME
 
|NAME
 
|
 
|
Line 167: Line 171:
 
|-
 
|-
 
|
 
|
|PERIOD
+
|
 
|NAME
 
|NAME
 
|
 
|
Line 228: Line 232:
 
|#{CURRENTDATE(yyyyMMdd)}
 
|#{CURRENTDATE(yyyyMMdd)}
 
|system date
 
|system date
 +
|-
 +
|GETQUARTER()
 +
|
 +
|date
 +
|
 +
|#{GETQUARTER(HEADERFIELD(INVDATE))}
 +
|3
 
|}
 
|}
 
<br/>{{Warning|When an incorrect keyword is given, an error will occur when the template is applied.}}<br/>
 
{{warning|The keywords are case sensitive, you have to enter the upper case code of the field (not the name!)}}
 

Latest revision as of 10:19, 29 May 2017

In templates, you have the possibility to use keywords. These keywords allow you to create a pattern to fill in a field.


Info.png Keywords can only be used in text fields.

Info.png Keywords can be used in combination with fixed text.

1 Date formats

Day = d
Month = M
Year = y
Hour = H
Minutes = m
End of month: EOM
Begin of month: BOM

2 List of keywords

A keyword can be used to automatically fill in the value of a field inside a template. They are always constructed in the same way: #{FIELDNAME/FUNCTION, PARAMETERS}.
All available fields of a document can be used. See the table below for examples.


Warning.png When an incorrect keyword is given, an error will occur when the template is applied.

Warning.png The keywords are case sensitive, you have to enter the upper case code of the field (not the name!)

Keyword function Fieldcode Parameter 1 Parameter 2 Example keywords Example output
HEADERFIELD SUPPCODE CODE #{HEADERFIELD(SUPPCODE,CODE)} 6
NAME #{HEADERFIELD(SUPPCODE,NAME)} Belgacom
SUPPVATID #{HEADERFIELD(SUPPVATID)} BE0202239951
CUSTCODE CODE #{HEADERFIELD(CUSTCODE,CODE)} 6
NAME #{HEADERFIELD(CUSTCODE,NAME)} Belgacom
CUSTVATID #{HEADERFIELD(CUSTVATID)} BE0202239951
JOURNAL CODE #{HEADERFIELD(JOURNAL,CODE)} 600
NAME #{HEADERFIELD(JOURNAL,NAME)} Purchase
INVNR #{HEADERFIELD(INVNR)} 001201600424
INVDATE dateformat calculation #{HEADERFIELD(INVDATE,yyyy,+1y)} 05/09/2014 becomes 2015
COMMENT1 #{HEADERFIELD(COMMENT1)} Comment
OGM #{HEADERFIELD(OGM)} 002637611771
NETAMNT #{HEADERFIELD(NETAMNT)} 100.00
VATAMNT #{HEADERFIELD(VATAMNT)} 21.00
TOTAMNT #{HEADERFIELD(TOTAMNT)} 121.00
CURRENCY CODE #{HEADERFIELD(CURRENCY,CODE)} EUR
NAME #{HEADERFIELD(CURRENCY,NAME)} Euro
YEAR CODE VIS: #{HEADERFIELD(YEAR,CODE)} 2016
NAME VIS: #{HEADERFIELD(YEAR,NAME)} 2016
PERIOD CODE EIS & OIS: #{HEADERFIELD(PERIOD,CODE)} 2016-7
NAME EIS & OIS: #{HEADERFIELD(PERIOD,NAME)} 2016-7
TECHNICALFIELD SCANBATCH #{TECHNICALFIELD(SCANBATCH)} 04/05/16 13:47:29
SCANUSER #{TECHNICALFIELD(SCANUSER)} ONEA
SCANNINGDATE dateformat calculation #{TECHNICALFIELD(SCANNINGDATE,yyyyMMdd,EOM)} 05/09/2014 becomes 20140930
INCOMINGDATE dateformat calculation #{TECHNICALFIELD(INCOMINGDATE,yyyyMMdd,BOM)} 05/09/2014 becomes 20140901
COMPANYNAME() #{COMPANYNAME()} Onea
USERNAME() #{USERNAME()} ONEA
USERREALNAME() #{USERREALNAME()} Onea
CURRENTDATE() dateformat calculation #{CURRENTDATE(yyyyMMdd)} system date
GETQUARTER() date #{GETQUARTER(HEADERFIELD(INVDATE))} 3