Difference between revisions of "Appendix: Keywords"
From 1Archive help
(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...") |
|||
Line 1: | Line 1: | ||
− | In templates, | + | In templates, you have the possibility to use keywords. These keywords allow you to create a pattern to fill in a field.<br/> |
− | |||
− | |||
− | + | <br/>{{info|Keywords can only be used in text fields.}}<br/> | |
− | + | {{info|Keywords can be used in combination with fixed text.}}<br/> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{ | ||
− | |||
− | |||
− | |||
== Date formats == | == Date formats == | ||
Line 47: | Line 14: | ||
Begin of month: BOM<br/> | Begin of month: BOM<br/> | ||
− | == | + | == List of keywords == |
On several objects, keywords can be used on all the fields in the system. | On several objects, keywords can be used on all the fields in the system. | ||
− | {| | + | {| 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 | + | ! style="text-align:left"|Example input |
− | ! style="text-align:left"|Example | + | ! style="text-align:left"|Example output |
|- | |- | ||
|HEADERFIELD | |HEADERFIELD | ||
Line 62: | Line 30: | ||
|CODE | |CODE | ||
| | | | ||
− | | | + | |#{HEADERFIELD(SUPPCODE,CODE)} |
+ | |6 | ||
|- | |- | ||
| | | | ||
Line 68: | Line 37: | ||
|NAME | |NAME | ||
| | | | ||
− | | | + | |#{HEADERFIELD(SUPPCODE,NAME)} |
+ | |Belgacom | ||
|- | |- | ||
| | | | ||
Line 74: | Line 44: | ||
| | | | ||
| | | | ||
− | | | + | |#{HEADERFIELD(SUPPVATID)} |
+ | |BE0202239951 | ||
|- | |- | ||
| | | | ||
Line 80: | Line 51: | ||
|CODE | |CODE | ||
| | | | ||
− | | | + | |#{HEADERFIELD(CUSTCODE,CODE)} |
+ | |6 | ||
|- | |- | ||
| | | | ||
Line 86: | Line 58: | ||
|NAME | |NAME | ||
| | | | ||
− | | | + | |#{HEADERFIELD(CUSTCODE,NAME)} |
+ | |Belgacom | ||
|- | |- | ||
| | | | ||
Line 92: | Line 65: | ||
| | | | ||
| | | | ||
− | | | + | |#{HEADERFIELD(CUSTVATID)} |
+ | |BE0202239951 | ||
|- | |- | ||
| | | | ||
Line 99: | Line 73: | ||
| | | | ||
|#{HEADERFIELD(JOURNAL,CODE)} | |#{HEADERFIELD(JOURNAL,CODE)} | ||
+ | |600 | ||
|- | |- | ||
| | | | ||
Line 105: | Line 80: | ||
| | | | ||
|#{HEADERFIELD(JOURNAL,NAME)} | |#{HEADERFIELD(JOURNAL,NAME)} | ||
+ | |Purchase | ||
|- | |- | ||
| | | | ||
Line 111: | Line 87: | ||
| | | | ||
|#{HEADERFIELD(INVOICENR)} | |#{HEADERFIELD(INVOICENR)} | ||
+ | |001201600424 | ||
|- | |- | ||
| | | | ||
Line 116: | Line 93: | ||
|dateformat | |dateformat | ||
|calculation | |calculation | ||
− | |#{HEADERFIELD(INVDATE,yyyy,+1y)} | + | |#{HEADERFIELD(INVDATE,yyyy,+1y)} |
+ | |05/09/2014 becomes 2015 | ||
|- | |- | ||
| | | | ||
Line 122: | Line 100: | ||
| | | | ||
| | | | ||
− | |#{HEADERFIELD(COMMENT1)} | + | |#{HEADERFIELD(COMMENT1)} |
+ | |Comment | ||
|- | |- | ||
| | | | ||
Line 128: | Line 107: | ||
| | | | ||
| | | | ||
− | |#{HEADERFIELD(OGM)} | + | |#{HEADERFIELD(OGM)} |
+ | |002637611771 | ||
|- | |- | ||
| | | | ||
Line 134: | Line 114: | ||
| | | | ||
| | | | ||
− | |#{HEADERFIELD(NETAMNT)} | + | |#{HEADERFIELD(NETAMNT)} |
+ | |100.00 | ||
|- | |- | ||
| | | | ||
Line 140: | Line 121: | ||
| | | | ||
| | | | ||
− | |#{HEADERFIELD(VATAMNT)} | + | |#{HEADERFIELD(VATAMNT)} |
+ | |21.00 | ||
|- | |- | ||
| | | | ||
Line 146: | Line 128: | ||
| | | | ||
| | | | ||
− | |#{HEADERFIELD(TOTAMNT)} | + | |#{HEADERFIELD(TOTAMNT)} |
+ | |121.00 | ||
|- | |- | ||
| | | | ||
Line 152: | Line 135: | ||
|CODE | |CODE | ||
| | | | ||
− | |#{HEADERFIELD(CURRENCY,CODE)} | + | |#{HEADERFIELD(CURRENCY,CODE)} |
+ | |EUR | ||
|- | |- | ||
| | | | ||
Line 158: | Line 142: | ||
|NAME | |NAME | ||
| | | | ||
− | |#{HEADERFIELD(CURRENCY,NAME)} | + | |#{HEADERFIELD(CURRENCY,NAME)} |
+ | |Euro | ||
|- | |- | ||
| | | | ||
Line 164: | Line 149: | ||
|CODE | |CODE | ||
| | | | ||
− | |#{HEADERFIELD(YEAR,CODE)} | + | |VIS: #{HEADERFIELD(YEAR,CODE)} |
+ | |2016 | ||
|- | |- | ||
| | | | ||
Line 170: | Line 156: | ||
|NAME | |NAME | ||
| | | | ||
− | |#{HEADERFIELD(YEAR,NAME)} | + | |VIS: #{HEADERFIELD(YEAR,NAME)} |
+ | |2016 | ||
+ | |- | ||
+ | | | ||
+ | |PERIOD | ||
+ | |CODE | ||
+ | | | ||
+ | |EIS & OIS: #{HEADERFIELD(PERIOD,CODE)} | ||
+ | |2016-7 | ||
+ | |- | ||
+ | | | ||
+ | |PERIOD | ||
+ | |NAME | ||
+ | | | ||
+ | |EIS & OIS: #{HEADERFIELD(PERIOD,NAME)} | ||
+ | |2016-7 | ||
|- | |- | ||
|TECHNICALFIELD | |TECHNICALFIELD | ||
Line 177: | Line 178: | ||
| | | | ||
|#{TECHNICALFIELD(SCANBATCH)} | |#{TECHNICALFIELD(SCANBATCH)} | ||
+ | |04/05/16 13:47:29 | ||
|- | |- | ||
| | | | ||
Line 183: | Line 185: | ||
| | | | ||
|#{TECHNICALFIELD(SCANUSER)} | |#{TECHNICALFIELD(SCANUSER)} | ||
+ | |ONEA | ||
|- | |- | ||
| | | | ||
Line 188: | Line 191: | ||
|dateformat | |dateformat | ||
|calculation | |calculation | ||
− | |#{TECHNICALFIELD(SCANNINGDATE,yyyyMMdd,EOM)} | + | |#{TECHNICALFIELD(SCANNINGDATE,yyyyMMdd,EOM)} |
+ | |05/09/2014 becomes 20140930 | ||
|- | |- | ||
| | | | ||
Line 194: | Line 198: | ||
|dateformat | |dateformat | ||
|calculation | |calculation | ||
− | |#{TECHNICALFIELD(INCOMINGDATE,yyyyMMdd,BOM)} | + | |#{TECHNICALFIELD(INCOMINGDATE,yyyyMMdd,BOM)} |
+ | |05/09/2014 becomes 20140901 | ||
|- | |- | ||
|COMPANYNAME() | |COMPANYNAME() | ||
Line 201: | Line 206: | ||
| | | | ||
|#{COMPANYNAME()} | |#{COMPANYNAME()} | ||
+ | |Onea | ||
|- | |- | ||
|USERNAME() | |USERNAME() | ||
Line 207: | Line 213: | ||
| | | | ||
|#{USERNAME()} | |#{USERNAME()} | ||
+ | |ONEA | ||
|- | |- | ||
|USERREALNAME() | |USERREALNAME() | ||
Line 213: | Line 220: | ||
| | | | ||
|#{USERREALNAME()} | |#{USERREALNAME()} | ||
+ | |Onea | ||
|- | |- | ||
|CURRENTDATE() | |CURRENTDATE() | ||
Line 218: | Line 226: | ||
|dateformat | |dateformat | ||
|calculation | |calculation | ||
− | |#{CURRENTDATE(yyyyMMdd)} --> | + | |#{CURRENTDATE(yyyyMMdd)} |
+ | |system date | ||
+ | |} | ||
+ | |||
+ | ==Examples== | ||
+ | {| class="wikitable" style="width:85%;" | ||
+ | !|Keyword | ||
+ | !|Example output | ||
+ | |- | ||
+ | |Consumption #{HEADERFIELD(SUPPCODE,NAME)} #HEADERFIELD{(INVDATE,yyyy)} || Consumption Belgacom 2016 | ||
+ | |- | ||
+ | |#{HEADERFIELD(INVDATE,yyyy,-1y)} || 2015 | ||
+ | |- | ||
+ | |#{HEADERFIELD(INVDATE,MM,+1M)} || 04 | ||
+ | |- | ||
+ | |Scanned: #{TECHNICALFIELD(SCANNINGDATE)} || Scanned: 20160504150913 | ||
+ | |- | ||
+ | |Scanned: #{TECHNICALFIELD(SCANNINGDATE,yyyy)}-#{TECHNICALFIELD(SCANNINGDATE,MM)}-#{TECHNICALFIELD(SCANNINGDATE,dd)}<br/>#{TECHNICALFIELD(SCANNINGDATE,HH)}:#{TECHNICALFIELD(SCANNINGDATE,mm)}:#{TECHNICALFIELD(SCANNINGDATE,ss)} || Scanned: 2016-05-04 15:09:13 | ||
|} | |} | ||
+ | |||
+ | <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!)}} |
Revision as of 10:55, 13 July 2016
In templates, you have the possibility to use keywords. These keywords allow you to create a pattern to fill in a field.
Keywords can only be used in text fields. |
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
On several objects, keywords can be used on all the fields in the system.
Keyword function | Fieldcode | Parameter 1 | Parameter 2 | Example input | Example output |
---|---|---|---|---|---|
HEADERFIELD | SUPPCODE | CODE | #{HEADERFIELD(SUPPCODE,CODE)} | 6 | |
SUPPCODE | NAME | #{HEADERFIELD(SUPPCODE,NAME)} | Belgacom | ||
SUPPVATID | #{HEADERFIELD(SUPPVATID)} | BE0202239951 | |||
CUSTCODE | CODE | #{HEADERFIELD(CUSTCODE,CODE)} | 6 | ||
CUSTCODE | NAME | #{HEADERFIELD(CUSTCODE,NAME)} | Belgacom | ||
CUSTVATID | #{HEADERFIELD(CUSTVATID)} | BE0202239951 | |||
JOURNAL | CODE | #{HEADERFIELD(JOURNAL,CODE)} | 600 | ||
JOURNAL | NAME | #{HEADERFIELD(JOURNAL,NAME)} | Purchase | ||
INVOICENR | #{HEADERFIELD(INVOICENR)} | 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 | ||
CURRENCY | NAME | #{HEADERFIELD(CURRENCY,NAME)} | Euro | ||
YEAR | CODE | VIS: #{HEADERFIELD(YEAR,CODE)} | 2016 | ||
YEAR | NAME | VIS: #{HEADERFIELD(YEAR,NAME)} | 2016 | ||
PERIOD | CODE | EIS & OIS: #{HEADERFIELD(PERIOD,CODE)} | 2016-7 | ||
PERIOD | 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 |
3 Examples
Keyword | Example output |
---|---|
Consumption #{HEADERFIELD(SUPPCODE,NAME)} #HEADERFIELD{(INVDATE,yyyy)} | Consumption Belgacom 2016 |
#{HEADERFIELD(INVDATE,yyyy,-1y)} | 2015 |
#{HEADERFIELD(INVDATE,MM,+1M)} | 04 |
Scanned: #{TECHNICALFIELD(SCANNINGDATE)} | Scanned: 20160504150913 |
Scanned: #{TECHNICALFIELD(SCANNINGDATE,yyyy)}-#{TECHNICALFIELD(SCANNINGDATE,MM)}-#{TECHNICALFIELD(SCANNINGDATE,dd)} #{TECHNICALFIELD(SCANNINGDATE,HH)}:#{TECHNICALFIELD(SCANNINGDATE,mm)}:#{TECHNICALFIELD(SCANNINGDATE,ss)} |
Scanned: 2016-05-04 15:09:13 |
When an incorrect keyword is given, an error will occur when the template is applied. |
The keywords are case sensitive, you have to enter the upper case code of the field (not the name!) |