Truncate Blueprint Label

How can I truncate a block label in the Kirby Panel based on a field’s value?
Where would I implement this method? Something like:

yaml

label: "{{ fieldName.truncate }}" // Doesn't work

Is there a built-in KQL function or another recommended way to dynamically truncate the label?

Could you please provide more context where you are using this label?

title: Example
icon: file-image
label: "{{fieldName.truncate}}"
preview: fields
wysiwyg: true
tabs:
  content:
    fields:
      fieldName:
        label: Description Text
        type: textarea
  config: tabs/config

This is a custom block and I would love to give my Editor a glimpse of the sometimes long textarea content the specific instance was filled with when the block is folded.

Thank you for your response in Advance!

Thanks for clarifying. In this case, this is not Kirby’s query language (even though it looks like it), but that a JavaScript placeholder that will be replaced by the field value, and cannot be modified by any methods.

It might make more sense to create a custom preview for your custom block.