OK, problem solved.
I managed to do something that’s working thru an automation, i don’t think it’s ideal, but it does the job, it’s basically the same workflow I explained above, but automated and with a couple of tweaks.
So, in the profile page of my app, I inserted a button (edit record) with the label “modify email”. The button does two things, it modifies the email and checks a box in my database (the checkbox is a hidden field within the “modify email” button).
Then in Airtable, I configured an automation (when a record enters a view), being the view my users table with a filter of this checkbox checked, create a new record, (I had to manually add every single field and program it so it’s dynamically filled with the data of the record that triggered the automation), finally run a script that deletes the old record.
In the Softr app I did also two things, I changed the setup of the profile page so it shows the data of the user based on the name, not the email, if not, the page would go blank after modifying the email, also, I modified the output message of the button as “please sign in again to see the changes”.
I tried the workflow with different sample users and works nicely, the end user won’t know a thing, sad part of it is that any changes, or new fields or deleted fields to my user table will cause problems to the automation, so I need to keep an eye on it.
// Get the record ID that triggered the automation
let inputConfig = input.config();
let recordId = inputConfig.recordId;
// Fetch the table
const table = base.getTable('Usuarios');
try {
// Delete the record
await table.deleteRecordAsync(recordId);
console.log('Record deleted successfully!');
} catch (error) {
console.error('Error deleting record:', error);
}
Quick demo: User Data Update Process 👨💻 | Loom
PS: I tried to duplicate all the data from the original record thru an script and didn’t it made it, if anybody wants to jump in with a solution for that, I would appreciate it.
Hope that works for anybody running into the same problem,
Enjoy,