Difference between revisions of "Appendix: Keywords"

From 1Archive help
Jump to: navigation, search
(Created page with "In templates, it is possible to make use of keywords.<br/> Through these keywords, validated fields (that are not empty) can be used when the templates on the invoice are appl...")
 
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
In templates, it is possible to make use of keywords.<br/>
+
In templates, you have the possibility to use keywords. These keywords allow you to create a pattern to fill in a field.<br/>
Through these keywords, validated fields (that are not empty) can be used when the templates on the invoice are applied.<br/>
 
Keywords can only be used in text fields (Remarks on header level, Description on posting level), eventually in combination with fixed text.
 
  
== Examples ==
+
<br/>{{info|Keywords can only be used in text fields.}}<br/>
 
+
{{info|Keywords can be used in combination with fixed text.}}<br/>
Following examples are usefull:
 
 
 
'''Incoming: fe. invoice date = 28/08/2014, supplier = Belgacom'''
 
 
 
Consumption #{HEADERFIELD(SUPPCODE,NAME)} #{HEADERFIELD(INVDATE,yyyy)} —> Consumption Belgacom 2014
 
 
 
Consumption #{HEADERFIELD(INVDATE,yyyy)} —> Consumption 2014
 
 
 
Consumption #{HEADERFIELD(INVDATE,yyyy,-1y)} —> Consumption 2013
 
 
 
Consumption #{HEADERFIELD(INVDATE,yyyy,+1y)} —> Consumption 2015
 
 
 
Consumption #{HEADERFIELD(INVDATE,MM-yyyy)} —> Consumption 8-2014
 
 
 
Consumption month #{HEADERFIELD(INVDATE,MM,-1M)} —> Consumption month 7
 
 
 
Consumption month #{HEADERFIELD(INVDATE,MM)} —> Consumption month 8
 
 
 
Consumption month #{HEADERFIELD(INVDATE,MM,+1M)} —> Consumption month 9
 
 
 
Consumption #{HEADERFIELD(YEAR,CODE)} —> Consumption 2014
 
 
 
 
 
'''Outgoing: fe. invoice date = 28/08/2014, customer = Belgacom'''
 
 
 
Consumption #{HEADERFIELD(CUSTCODE,NAME)} #{HEADERFIELD(INVDATE,yyyy)} —> Consumption Belgacom 2014
 
 
 
{{Warning|When an incorrect keyword is given, an error will occur when the template is applied.}}
 
 
 
 
 
{{Warning|Case sensitive!}}
 
  
 
== Date formats ==
 
== Date formats ==
Line 47: Line 14:
 
Begin of month: BOM<br/>
 
Begin of month: BOM<br/>
  
== list 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"
 
! style="text-align:left; width:150px"|Keyword function
 
! style="text-align:left; width:150px"|Keyword function
 +
! style="text-align:left; width:150px"|Fieldcode
 
! style="text-align:left; width:150px"|Parameter 1
 
! style="text-align:left; width:150px"|Parameter 1
 
! style="text-align:left; width:150px"|Parameter 2
 
! style="text-align:left; width:150px"|Parameter 2
! style="text-align:left; width:150px"|Parameter 3
+
! style="text-align:left"|Example keywords
! style="text-align:left"|Example
+
! style="text-align:left"|Example output
 
|-
 
|-
 
|HEADERFIELD
 
|HEADERFIELD
Line 62: Line 34:
 
|CODE
 
|CODE
 
|
 
|
|Only incoming! #{HEADERFIELD(SUPPCODE,CODE)} --> 6
+
|#{HEADERFIELD(SUPPCODE,CODE)}
 +
|6
 
|-
 
|-
 
|
 
|
|SUPPCODE
+
|
 
|NAME
 
|NAME
 
|
 
|
|Only incoming! #{HEADERFIELD(SUPPCODE,NAME)} --> Belgacom
+
|#{HEADERFIELD(SUPPCODE,NAME)}
 +
|Belgacom
 
|-
 
|-
 
|
 
|
Line 74: Line 48:
 
|
 
|
 
|
 
|
|Only incoming! #{HEADERFIELD(SUPPVATID)}
+
|#{HEADERFIELD(SUPPVATID)}
 +
|BE0202239951
 
|-
 
|-
 
|
 
|
Line 80: Line 55:
 
|CODE
 
|CODE
 
|
 
|
|Only outgoing! #{HEADERFIELD(CUSTCODE,CODE)} --> 6
+
|#{HEADERFIELD(CUSTCODE,CODE)}
 +
|6
 
|-
 
|-
 
|
 
|
|CUSTCODE
+
|
 
|NAME
 
|NAME
 
|
 
|
|Only outgoing! #{HEADERFIELD(CUSTCODE,NAME)} --> Belgacom
+
|#{HEADERFIELD(CUSTCODE,NAME)}
 +
|Belgacom
 
|-
 
|-
 
|
 
|
Line 92: Line 69:
 
|
 
|
 
|
 
|
|Only outgoing! #{HEADERFIELD(CUSTVATID)}
+
|#{HEADERFIELD(CUSTVATID)}
 +
|BE0202239951
 
|-
 
|-
 
|
 
|
Line 99: Line 77:
 
|
 
|
 
|#{HEADERFIELD(JOURNAL,CODE)}
 
|#{HEADERFIELD(JOURNAL,CODE)}
 +
|600
 
|-
 
|-
 
|
 
|
|JOURNAL
+
|
 
|NAME
 
|NAME
 
|
 
|
 
|#{HEADERFIELD(JOURNAL,NAME)}
 
|#{HEADERFIELD(JOURNAL,NAME)}
 +
|Purchase
 
|-
 
|-
 
|
 
|
|INVOICENR
+
|INVNR
 
|
 
|
 
|
 
|
|#{HEADERFIELD(INVOICENR)}
+
|#{HEADERFIELD(INVNR)}
 +
|001201600424
 
|-
 
|-
 
|
 
|
Line 116: Line 97:
 
|dateformat
 
|dateformat
 
|calculation
 
|calculation
|#{HEADERFIELD(INVDATE,yyyy,+1y)} --> 05/09/2014 becomes 2015
+
|#{HEADERFIELD(INVDATE,yyyy,+1y)}
 +
|05/09/2014 becomes 2015
 
|-
 
|-
 
|
 
|
Line 122: Line 104:
 
|
 
|
 
|
 
|
|#{HEADERFIELD(COMMENT1)}  
+
|#{HEADERFIELD(COMMENT1)}
 +
|Comment
 
|-
 
|-
 
|
 
|
Line 128: Line 111:
 
|
 
|
 
|
 
|
|#{HEADERFIELD(OGM)}  
+
|#{HEADERFIELD(OGM)}
 +
|002637611771
 
|-
 
|-
 
|
 
|
Line 134: Line 118:
 
|
 
|
 
|
 
|
|#{HEADERFIELD(NETAMNT)} --> 100.00
+
|#{HEADERFIELD(NETAMNT)}
 +
|100.00
 
|-
 
|-
 
|
 
|
Line 140: Line 125:
 
|
 
|
 
|
 
|
|#{HEADERFIELD(VATAMNT)} --> 21.00
+
|#{HEADERFIELD(VATAMNT)}
 +
|21.00
 
|-
 
|-
 
|
 
|
Line 146: Line 132:
 
|
 
|
 
|
 
|
|#{HEADERFIELD(TOTAMNT)} --> 121.00
+
|#{HEADERFIELD(TOTAMNT)}
 +
|121.00
 
|-
 
|-
 
|
 
|
Line 152: Line 139:
 
|CODE
 
|CODE
 
|
 
|
|#{HEADERFIELD(CURRENCY,CODE)} --> EUR
+
|#{HEADERFIELD(CURRENCY,CODE)}
 +
|EUR
 
|-
 
|-
 
|
 
|
|CURRENCY
+
|
 
|NAME
 
|NAME
 
|
 
|
|#{HEADERFIELD(CURRENCY,NAME)} --> Euro
+
|#{HEADERFIELD(CURRENCY,NAME)}
 +
|Euro
 
|-
 
|-
 
|
 
|
Line 164: Line 153:
 
|CODE
 
|CODE
 
|
 
|
|#{HEADERFIELD(YEAR,CODE)}
+
|VIS: #{HEADERFIELD(YEAR,CODE)}
 +
|2016
 +
|-
 +
|
 +
|
 +
|NAME
 +
|
 +
|VIS: #{HEADERFIELD(YEAR,NAME)}
 +
|2016
 +
|-
 +
|
 +
|PERIOD
 +
|CODE
 +
|
 +
|EIS & OIS: #{HEADERFIELD(PERIOD,CODE)}
 +
|2016-7
 
|-
 
|-
 
|
 
|
|YEAR
+
|
 
|NAME
 
|NAME
 
|
 
|
|#{HEADERFIELD(YEAR,NAME)}
+
|EIS & OIS: #{HEADERFIELD(PERIOD,NAME)}
 +
|2016-7
 
|-
 
|-
 
|TECHNICALFIELD
 
|TECHNICALFIELD
Line 177: Line 182:
 
|
 
|
 
|#{TECHNICALFIELD(SCANBATCH)}
 
|#{TECHNICALFIELD(SCANBATCH)}
 +
|04/05/16 13:47:29
 
|-
 
|-
 
|
 
|
Line 183: Line 189:
 
|
 
|
 
|#{TECHNICALFIELD(SCANUSER)}
 
|#{TECHNICALFIELD(SCANUSER)}
 +
|ONEA
 
|-
 
|-
 
|
 
|
Line 188: Line 195:
 
|dateformat
 
|dateformat
 
|calculation
 
|calculation
|#{TECHNICALFIELD(SCANNINGDATE,yyyyMMdd,EOM)} --> 05/09/2014 becomes 20140930
+
|#{TECHNICALFIELD(SCANNINGDATE,yyyyMMdd,EOM)}
 +
|05/09/2014 becomes 20140930
 
|-
 
|-
 
|
 
|
Line 194: Line 202:
 
|dateformat
 
|dateformat
 
|calculation
 
|calculation
|#{TECHNICALFIELD(INCOMINGDATE,yyyyMMdd,BOM)} --> 05/09/2014 becomes 20140901
+
|#{TECHNICALFIELD(INCOMINGDATE,yyyyMMdd,BOM)}
 +
|05/09/2014 becomes 20140901
 
|-
 
|-
 
|COMPANYNAME()
 
|COMPANYNAME()
Line 201: Line 210:
 
|
 
|
 
|#{COMPANYNAME()}
 
|#{COMPANYNAME()}
 +
|Onea
 
|-
 
|-
 
|USERNAME()
 
|USERNAME()
Line 207: Line 217:
 
|
 
|
 
|#{USERNAME()}
 
|#{USERNAME()}
 +
|ONEA
 
|-
 
|-
 
|USERREALNAME()
 
|USERREALNAME()
Line 213: Line 224:
 
|
 
|
 
|#{USERREALNAME()}
 
|#{USERREALNAME()}
 +
|Onea
 
|-
 
|-
 
|CURRENTDATE()
 
|CURRENTDATE()
Line 218: Line 230:
 
|dateformat
 
|dateformat
 
|calculation
 
|calculation
|#{CURRENTDATE(yyyyMMdd)} --> system date
+
|#{CURRENTDATE(yyyyMMdd)}
 +
|system date
 +
|-
 +
|GETQUARTER()
 +
|
 +
|date
 +
|
 +
|#{GETQUARTER(HEADERFIELD(INVDATE))}
 +
|3
 
|}
 
|}

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