A tag that's value is the year data started
This is related to not being able to manually create tags. For filtering reasons in Axiom, I want to be able to have a tag that's value is the year the tags were added (i.e., the year data from CygNet started flowing in). I know I can create a CSV import, or an API call. But, without a good deal of coding, those are one and done efforts. I need this tag to exist whenever a new asset is added (a few a month). So I thought I'd try Calculations.
I have tried a dozen different options. The one below; having one analytic that just writes NoOutput() to create a tag and then a 2nd analytic an hour later to write the current year; TagIfExists(), etc. Nothing works, there's always a blocker.
Any ideas how to accomplish this without manual intervention every time an asset is added?
I'm calculated current year using the equation below. Also open to suggestion there!
2020 + Floor(DurationSinceDateTime('01-01-2020') / 1000 / 60 / 60 / 24 / 365.25)
1 reply
-
Hi ,
This one is stumping me so far. You can return the earliest timestamp with the Excel Add-in and API using the Tag Data Context, but I'm not sure how to output this to a tag using a calculation. If I think of something I will let you know.