How to use Smart tags in Aico
Modified on Wed, 20 Mar at 12:47 PM
This article will explain the use of Smart tags when creating tasks in Automation manager.
Smart tags are used to set task parameters typically to change the values in a smart way. For example, instead of setting a fixed date, you can refer to a smart tag date of Last Period Calendar Day which will then change each period that you generate the task.
This article will outline the following:
Introducing smart tags
Where a smart tag has been used, the tag icon will turn green.
Wherever you see the tag icon, you can click on it to reveal the full list of smart tags.
For example, if you wanted to set the document date as the Period Last Calendar Day, you would click on this and when the document is generated, it will set the document date for the last day of that period.
Smart tag descriptions
Below is a complete description of the smart tags and their function.
Company Code
This sets the company code of the company that you are generating the task for.
When running a program for multiple company codes, this smart tag will change the company code in the program parameter to the one associated with the company you are running the program for without you having to set it multiple times.
Company Name
This sets the Company name from the Automation Manager company settings.
This is not the System manager company name, although these could have been set the same way.
Company Attribute 1 - 5
These are the 5 attributes that are found under each company in Automation Manager.
These are not the System manager company attributes.
Period
This will add the Period in the form YEAR-MO, for example, 2022-12
Note that, in the eBS plug-in only, Period looks up the Period name in the eBS database and will set that for example DEC-22.
Period Year
Sets the Period Year from the period you are generating the tasks, for example, 2022.
This will react to any custom calendar settings for their associated companies.
Period Number
Sets the Period Number from the period you are generating the tasks, for example, 12.
This will react to any custom calendar settings for their associated companies.
Period Last Calendar Day
This will set the last calendar day of the period you are generating the tasks, for example, 31 March 2022 or 30 June 2022.
This will react to any custom calendar settings for their associated companies.
Period Last Working Day
This will set the last working day of the period you are generating the tasks for, taking into account the holiday calendar linked to the company.
This will react to any custom calendar settings for their associated companies.
Period First Calendar Day
This will set the first calendar day of the period you are generating the tasks, for example, 1 March 2022 or 1 June 2022.
This will react to any custom calendar settings for their associated companies.
Period First Working Day
This will set the first working day of the period you are generating the tasks for taking into account the holiday calendar linked to the company.
This will react to any custom calendar settings for their associated companies.
Next period First Calendar Day
This will set the first calendar day of the period after the one you are generating the tasks for. For example, if you are generating tasks for March, it will set the 1 April.
This will react to any custom calendar settings for their associated companies.
Next period First Working Day
This will set the first working day of the period after the one you are generating the tasks for, taking into account the holiday calendar linked to the company.
This will react to any custom calendar settings for their associated companies.
Prior Period Year
This will set the year before the one you are generating the tasks. For example, if you are generating tasks for January 2023 it will set 2022.
This will react to any custom calendar settings for their associated companies.
First day of Period Year
This will set the first day of the year that you are generating tasks for. For example, if you generating any period in 2022 it will set 1 January 2022.
This will react to any custom calendar settings for their associated companies. This will mean that if the “real” period is September 2022, but the custom calendar for that company says that it is Period 3 of 2023 then it will set 1 July 2022 as the first day of the Period Year.
Next Period Year
This will set the year after the one you are generating the tasks. For example, if you are generating tasks for January 2022 it will set 2023.
This will react to any custom calendar settings for their associated companies.
External Company Code
This will set the external company code value that has been set against the Company in the Automation manager integration properties.
This is not the System manager company External ID.
Empty Value
This will clear any value set in this parameter.
This is typically used when the value is coming from an SAP variant and you want to remove it, for example, if the variant has a Test Run set as True and you want to remove this value.
Next Period Number
This will set the period number of the period after the one you are generating tasks for.
This is useful when opening and closing periods using a program when you need to tell the program which period to open. It understands that Period 1 comes after Period 12.
Template Code
This will set the Automation manager task template code into the associated header. Introduced in 23.1.
Smart tag formulas
By embedding smart tags into formulas, Aico provides significant additional configurability in the program parameters. Below are a list of examples that you can use/adapt for your templates. Click the smart tag symbol (1) that appears after the parameter you want to set. The formula box (2) is at the end of the list of pre-built smart tags. Click in the box and the = will automatically appear and a list of possible selections. You can use a number of the standard functions such as IF, DATEADD, DATEDIFF, CONCATENATE, LEFT, RIGHT, TRUNC to build your formulas.
Simply copy and paste the formula you want to add into the formula box (2).
Sets the date as the first calendar day of the period after the one you are closing.
=DATEADD( {periodFirstCalendarDay} ,1,"MO")
Sets the last calendar day of the prior year period (to compare to prior year)
=DATEADD( {periodLastCalendarDay} ,-12,"MO")
Sets the next fiscal year when the period number is 12 - used to set the next year when opening a period.
={periodNumber}-1)
Sets the period number of the prior period which is often used in comparison reports. Be careful when using this for Period 1 as it will return 0 and this could cause an error in your report. You might then want to use a formula = IF({periodNumber}=1,1,{periodNumber}-1) which will mean in Period 1 you are really unable to compare with the prior period.
= IF ( {periodNumber} = 12, {nextPeriodYear}, {periodYear})
Sets a fixed piece of text followed by the Period Year-Period Number. This could, for example, return Provision posting 2022-10 as a document description in a journal.
=CONCATENATE( "Provision posting"," ", {periodYear},"-",{periodNumber})
To remove a formula, click on --UNSELECT-- at the very top of the smart tag drop-down list.
Additional Functions
There is a wider list of functions available but not all are relevant for Automation manager. Below is an expanded list of supported functions:
Logical:
AND, OR, IF, TRUE, FALSE, IFNULL, NULL
MathTrig:
ABS, RAND, RANDBETWEEN, SUM, SUMIF
Statistical:
AVERAGE, COUNT, COUNTIF, MAX, MIN
Text:
CONCATENATE, FIND, LEFT, LEN, MID, REPLACE, RIGHT, SEARCH, SUBSTITUTE, TEXT, TRIM, TRUNC
Date:
DATEADD, DATEDIFF
WORKDAY Formula
WORKDAY formula support was added in 23.1.
ISWORKDAY:
Returns true/false depending on if the date is a workday or holiday
NEXTWORKDAY:
Returns the next possible workday starting from the current/given date
PREVIOUSWORKDAY:
Returns the last possible workday before the current/given date
WORKDAY:
Returns the nth workday in the current month. nthDay can be a positive number (from the beginning of the month) or a negative (from the end of the month).
A simple example is to set your reversal dates on an automatic journal as workday 4 using a workday formula:
=WORKDAY(4, {nextPeriodFirstCalendarDay}
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article