How-to
Short answer: Not with a formula. Use an integration that copies the attachment's Name into a text field after submission, or a button that runs a short script.
Why it happens
- An attachment field holds a list of files, not text. A text formula fails with "Expression is returning 'JSONList' Allowed Types are 'String'".
- Field events can't be added to attachment fields, so nothing runs when a file is uploaded.
How to fix it
With an integration:
- Create an integration with a Kissflow Process trigger such as When a draft item is submitted.
- Add Update an item for the same item.
- Map the attachment field's Name for the first file (index
0) into a text field. - Test the action, then turn on the integration.
With a button on the form:
- Add a button and give it an On Click event.
- Use a script that reads the field and writes the name, for example:
let file = await kf.context.getField("Document"); kf.context.updateField({"Document_name": file[0]["name"]}) - Replace
DocumentandDocument_namewith your field IDs.
Tip
The integration fills the field after the item is submitted. The button fills it while the user is still on the form.
