Get a field name in formulas

Airtable has the useful feature of tracking the field names in formulas.
Thus when we change the name of a field it’s automatically changed in formulas.

When we create a formula field containing a URL to the pre-filled form we must type the name of a field that we want to pre-fill in a formula:

"https://airtable.com/shr123456?prefill_My+field=" & {Another field}

If we rename the field but forget to change the formula we will end up with the old field name in the URL and the pre-filling won’t work.

The improvement I’d like to request is to add a new formula for getting the field name as a string by its reference. When we have it we can use it in the formula field:

"https://airtable.com/shr123456?prefill_" & ENCODE_URL_COMPONENT(FIELD_NAME({My field})) & "=" & {Another field}

and the field name in the URL will be updated each time when we rename the field.

1 Like

You can already do this. You can reference the field ID instead of the field name, so your prefilled form will always work, even if your field name changes.

Go into “Manage Fields” and chose to reveal the “Field ID” column. Then, use that field ID instead of the field name.

Great!
I apologize for my inattention. I have read the docs about prefilling the forms today but completely ignored the info box that explains how to use fields’ IDs instead of names.

Thank you for your help!

1 Like

You’re welcome! Glad I could help! :smiley:

1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.