Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Format Date in Custom Actions

Page 1 of 2Next

I have a update list action that is doing $strcat(Signed by ,[Modified By|Editor], on ,[Modified|Modified])

Which is giving me the date with time.  I would like to have the date only.  Even if I use the Today function I get the time.  I was wondering if anyone knew away to only get the date.

Thanks for you help

Jennifer

We'd be interested in this also.

Hi,

We can create a calculated column with date only part of "Modified" column. We can then use this calculated column as parameter in strcat.

To create calculated column, please go to the list -> List Settings -> Create new column and create the column as shown below:

After creating the calculated column, use this column placeholder as parameter in strcat function.

Ex: $strcat(Signed by ,[Modified By|Editor], on ,[ModifiedDate|ModifiedDate])

 

Uploaded files:
  • Calculated-Column.jpg

@jeckard and @pf-amalin

Another option you have is to use a variable to store the date value of the Modified field. Create a variable called Modified, and set the value to be $parsefieldvalue([Modified|Modified],Dateonly,T).

Then, in the $strcat function, use the variable value for the placeholder, like this: $strcat(Signed by ,[Modified By|Editor], on ,Modified##value)

Let me know if that works for you.

This worked for my needs.  Just so others know you can also format the date field in the presave script actionon the Nitro form as well and then have it update a field value.

I attempted to do this $parsefieldvalue([Modified|Modified],Dateonly,T). using the {Today} and it did not work in Crow Canyon workflow.  How can I get todays date just date not time.

Thanks

We can use $formatvalue({today}/[DateColumn],Types) to get date only value from date and time column. Types supported are DateSite and DateTimeSite. We can set this in a variable and use this further in $strcat() function as needed.

Example: $formatvalue([Created|Created],DateSite)

Output: 03/20/2020

UPDATE! Please see workaround at the bottom of the post. However last question is still valid.

I'm trying to do the same sort of thing here and with limited success.
I have created a calculated column to hold the date (only) part of the created date column and I have added this to the default view to confirm it is working correctly.
Now I want to use this new column as part of my $strcat function.
I am using: $strcat([ID|ID],_, [Requester|Requester],_, [RequestedDate|RequestedDate]) to update the title column.
But when the custom action is fired the title ends up as: 16_Jay_1899-12-29T11:00:00.000Z
The value of the calc column is: 30/12/1899
The calculated column is =Created (with date only checked).

Questions:
Could the calculated column be trying to resolve itself in parallel with the created date being determined hence the quirky date?
How comes the time is still being appended to the output of the custom action?
This custom action is supposed to be fired via a submit action but nothing happens. I have to click the button manually in the edit form. I'd prefer the submit action button be invisible and have it fire on the forms save (only the "new" form)

Update:
I changed the calculated column from =Created to =IF(Created<1,"",TEXT(Created,"yyyy-mmm-dd")) - this seems to work consistently. The flow on effect is that the custom action to update the title column also works now.
Would still like to know how to have my submit action fire the custom action rather than having to click the button manually.
I dragged a submit action on to the form and set it to fire a custom action but it doesn't

In these situations, we typically hide the save button, then style the custom action button to look like the save button.

Hiding the Save button is done in the Layouts and Theme section in the left panel as well as moving the custom action button alignment to mimic the Save button by setting the Bottom Action Panel Buttons Align to Right. Then its just a matter of renaming the button and selecting the fa-times-circle hide icon (5th row from the top).

Thanks but shouldn't the custom action, that is triggered by the submit action, fire automatically on save? (assuming that submit means an initial save for a new form)

Page 1 of 2Next