Skip to main content
Solved

Pipeline expression to concatenate and format date

  • Aug 27, 2025 3:04 PM UTC
  • 0 replies
  • 356 views

EmberKrumwied
Forum|alt.badge.img+13

I feel like I am close, but still getting an error on my jinja expression.

I need the pipeline to populate a text field based on the concatenation of 2 fields, 1 of which is a date field which needs to be formatted to text.

{{[b.report_asset_id + '-' + a.new_charge_date|date_mdy}}

Output should be HBL-0000-08-01-2025

HBL-0000 is the b.report_asset_id

08-01-2025 should be the formatted a.new_charge_date

Pipeline shows the following error:

Validation error: Incorrect template "{{[b.report_asset_id + '-' + a.new_charge_date|date_mdy}}": unexpected '}', expected ']'

Best answer by Mez

Easiest way for a text field is to keep the dash outside the expression or quote it inside. 

{{b.report_asset_id}}-{{a.new_charge_date|date_mdy}}

{{b.report_asset_id + "-" + a.new_charge_date|date_mdy}}

View original

MarkStrassel
Forum|alt.badge.img+5
  • Qrew Corporal
  • Aug 27, 2025 3:24 PM UTC

I believe you actually want to remove the [ after the {{ in the beginning....it's looking for the closing ] but you actually want to remove the [


EmberKrumwied
Forum|alt.badge.img+13
  • Author
  • Qrew Cadet
  • Aug 27, 2025 3:35 PM UTC

Thanks, removed the [ - still getting the error.


MarkStrassel
Forum|alt.badge.img+5
  • Qrew Corporal
  • Aug 27, 2025 3:40 PM UTC

Try this....

{{[b.report_asset_id] + '-' + [a.new_charge_date|date_mdy]}}


Mez
Forum|alt.badge.img+7
  • Qrew Colonel
  • Answer
  • Aug 27, 2025 4:41 PM UTC

Easiest way for a text field is to keep the dash outside the expression or quote it inside. 

{{b.report_asset_id}}-{{a.new_charge_date|date_mdy}}

{{b.report_asset_id + "-" + a.new_charge_date|date_mdy}}


EmberKrumwied
Forum|alt.badge.img+13
  • Author
  • Qrew Cadet
  • Aug 27, 2025 5:30 PM UTC

Tried the 1st option and that worked. Thank you.