Skip to main content
Solved

Pipeline expression to concatenate and format date


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

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

Thanks, removed the [ - still getting the error.


MarkStrassel
Forum|alt.badge.img+5

Try this....

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


Mez
Forum|alt.badge.img+7
  • Registered
  • Answer
  • August 27, 2025

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

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