Hi, I'm trying to display the time a form was modified/approved to create a unique approval number formatted as: XX–YYYYMMDD, where XX are the initials of the person approving.
I got this to work chaining several methods below:
[entry.name.upperCase.trunc(2)]-[entry.created.formatDate(yyyyMMddHHmm)].
However, this only works with the time when the form was created. I tried using [now] and FORMATDATE(NOW()) as decribed in this article, and the result is a random number like '1544543232619'.
Tried several ways of getting [now] to work but no luck.
after trying to get formatDateAs() and now() to work, got a way around it by
1. creating a separate field date that stores the epoch time
2. using two separate IFTTT macros to first assign current time to date and later to use that field value to format it using
[entry.name.upperCase.trunc(2)]-[entry.time.formatDate(yyyyMMdd)]
Each ConfiForms field has a "created" field, which is set with the value on record creation - you can use that field. Also, you can always use [entry._now] or just _now to access the current time
And you can apply any of the virtual function on these fields, as usual
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello there Andrey!
As far as I understand the documentation provided by the Confiform team, the approach to this would be to use the FORMATDATEAS function:
[entry.name.upperCase.trunc(2)]-[entry.created.FORMATDATEAS(now(),"yyyyMMddHHmm")]
The pattern used is correct, according to this Oracle documentation:
The number that you end up with is in EPOCH format, used by Unix. For example, 1544543232619 corresponds to Tuesday, December 11, 2018 3:47:12.619 PM.
Let us know if the FORMATDATEAS function works as expected!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works the same way as the functions I tried, namely output is in EPOCH format, not "yyyyMMddHHmm".
Seems that it only does it when I'm trying to get the current timestamp using
[now]
or
now()
P.S.: the form should grab the moment the form is approved, not the time it was created. I'm using IFTTT macro with onModified event and setting this parameter on the entry field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.