Forum Discussion

EmberKrumwied's avatar
EmberKrumwied
Qrew Captain
15 hours ago
Solved

Pipeline expression to concatenate and format date

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 ']'

  • 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}}

5 Replies

  • Mez's avatar
    Mez
    Qrew Captain

    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}}

  • 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 [