Concatenate "DateTime" with "Reference" Text

Hi folks!

How do I concatenate a DateTime column together with a Reference column to another table, with a Text Column. There is any way?

Thanks in advance!

1 Like

Hi Eduardo!

I made an example here: Concatenate Date + Ref + Text

You an use the format() function to format the different column types as a string. The formatting is between the "quotes". The empty squiggly bracket {} are placeholders for the columns in the function. The columns apply to the {} respectively.

3 Likes

Work Perfectly! Thanks!

I cannot read the formula column. It is grayed out. When I download as a CSV the formula is removed. Can you add the formula in another column so we can see your example? Or how am I able to view the formula you did? Concatenate Date + Ref + Text - Grist

https://tinyurl.com/2kzjogcb

Thank you

Hi Jennifer!

The formula is:

"{} - {} - {}".format($Date, $Ref.Text, $Text)

Here is a link to open the same document in Fiddle Mode. You’ll be able to double click and view/edit/copy the formula from this link.

https://public.getgrist.com/uDYwLSde5gYX/Concatenate-Date-Ref-Text/m/fork

Thanks,
Natalie

2 Likes

Perfect, thank you very much!

This is just what I was looking for, but my $Ref result displays in [‘Brackets’]. How can I remove them?


I have the same formula on another table that works perfectly. $RelatedJob has a Dropdown Condition, but I removed it temporarily and it didn’t resolve the brackets.

Would have to see the document to be sure, but the brackets likely mean that $RelatedJob_Job_Name is returning a list with a single value. You could try appending [0] to return to first value (i.e. $RelatedJob_Job_Name[0]) but there’s probably a better way to set things up if that column should always have a single value.

1 Like

That did it! That is a Reference List field, which I may just change to single choice, but the [0] works perfectly! Thank you!!