Prefix of "rec" to be added in a form field behind the scene

Dear All,

Anyone could help me as per below situation? I want to use part of the recordId as a reference, so that when user inputting it in a form, airtable can read it as an intact recordId. However, the code below is not working, anyone have an idea how to correct with it?

Example: recIt3LHSPRHAzmha
Input it as It3LHSPRHAzmha in the field and use the code to add rec back on it for airtable.


window.addEventListener(‘submit-form-form1’, (e) => {
console.log(‘form submit’, e.detail);
const payload = JSON.parse(e.detail.payload);
payload.RunRecordId = rec${payload.RunRecordId};
const serializedPayload = JSON.stringify(payload);
e.detail.payload = serializedPayload;
Appreciate your help!

Finally, get the solution from notion AI and here for reference:

window.addEventListener(‘submit-form-form1’, (e) => {
console.log(‘form submit’, e.detail);
e.detail.payload = JSON.stringify({
RunRecordId: rec${JSON.parse(e.detail.payload).RunRecordId},

Hi @artur , it works great yesterday, but when I tried today, error msg shown as below?

I didn’t change anything related to the field. That’s why it is really mysterious.

Any advice for me?