Help

Re: Create a form to update multiple fields in a table

Solved
Jump to Solution
823 0
cancel
Showing results for 
Search instead for 
Did you mean: 
CharlieMullin
7 - App Architect
7 - App Architect

I use several different forms that let users update field values. Upon submission a new record is created in an UPDATES table and the associated record is updated in the ASSETS table. This is accomplished using Kuovonne's Prefilled Form extension.

Note that if a user submits this form and the field value on the form is empty, then the associated existing value in the ASSETS table will now be empty as well, which is expected. To prevent this, I can make that field in the form mandatory in order to submit, so it contains a value.

However, I am facing a situation where there are six or so fields that a user may want to update -- but may only want to update some of those fields. Is there a way to add conditional code with this logic?:

Upon submitting the form
     - For each field that is empty - do nothing
     - Else, execute the code to update the field value in the ASSETS table

Maybe such logic can be incorporated into Kuovonne's Prefilled Form extension?

Any ideas or examples would be helpful.

Thanks!

 

 

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

I recently added a script to my automation helpers that lets you input a main value and an alternative value. If the main value is not blank, the script outputs the main value. If the main value is blank, the script outputs the alternative value. 

In your automation, you could do a find record action to find the record to be updated. Then for each field that might be blank in the form record, have an action where the "useAlterantiveValue" script determines if you should use the value from the form record or the value from the original found record. Finally, in your update record action, use the values outputted by the script. Note that this might be a bit tricky for some field types, as the values from "find records" tend to be arrays versus flat data values.

See Solution in Thread

7 Replies 7
ScottWorld
18 - Pluto
18 - Pluto

Sure, you would just need to create many different conditional actions in your automation. Note that Airtable has a limit on the number of actions that they allow per automation. I think the limit is 25.

However, if you want the absolutely easiest way to do this, that doesn't require another table to collect your form submissions, that doesn't require any automations at all, and doesn't require any prefill links at all, I would HIGHLY RECOMMEND that you check out Fillout's advanced forms for Airtable, which is 100% free.

Fillout lets you UPDATE AIRTABLE RECORDS from a form, amongst hundreds of other advanced features that Airtable’s forms don’t offer:

It offers multi-page forms, conditional paths for pages, accepting payments on forms, updating Airtable records from a form, creating linked records on a form, specifying the maximum number of linked records, displaying lookup fields & formulas & rollup fields on forms, and dozens of advanced Airtable-specific features that are not available in Airtable’s native forms.

Best of all, Fillout has direct, live, real-time communication with Airtable. There is no better form tool on the market that has better communication with Airtable than Fillout, because it was built from the ground up to work with Airtable.

I give a brief demonstration of Fillout on this episode of the BuiltOnAir Podcast. https://www.youtube.com/watch?v=xrqXdRNmQIY&list=PLqssva4liHRwHhQIpTXekG8WObEoyC2F1

Hope this helps! If you’d like to hire an expert Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld 

kuovonne
18 - Pluto
18 - Pluto

I recently added a script to my automation helpers that lets you input a main value and an alternative value. If the main value is not blank, the script outputs the main value. If the main value is blank, the script outputs the alternative value. 

In your automation, you could do a find record action to find the record to be updated. Then for each field that might be blank in the form record, have an action where the "useAlterantiveValue" script determines if you should use the value from the form record or the value from the original found record. Finally, in your update record action, use the values outputted by the script. Note that this might be a bit tricky for some field types, as the values from "find records" tend to be arrays versus flat data values.

Thanks @kuovonne , that sounds like a great solution. On your automation helpers, I can't tell which script you're referring to. Tell me more about making payment for the script, and will you provide basic support if needed?

The Automation Helpers contains several individual short scripts in a single package. You purchase the scripts through Gumroad, and you can access the scripts from your Gumroad account. Each script is in its one file/page and identified by name. Find the one you want and copy/paste the entire text of the script into the Airtable script editor, replacing any placeholder code already in the editor. Then setup the input variables in the left side of the script editor as described in the script itself. You do not have to make any edits to the code itself. 

As for support, I find that my customers who already are comfortable configuring and testing automations do not need support. When people have issues, the vast majority of the time it is because they have not set up the input variables correctly. I am not able to provide personal, base-specific support at the current low price. 

Hi @kuovonne , thanks for explaining how the script purchase works and I understand the support model. I'm looking forward to getting started soon. Really appreciate your help!

Hi @ScottWorld
hope you dont mind me resurfacing an old post.

The solution you advised is not possible to be recreated with airtable forms?
trying to understand what would be the limitations of the airtable forms, ideally would prefer to keep everything on airtable but if I have to go 3rd party then might as well just go from the start!
Sorry quite the newbie here!

Thank you

 

@Steph_Invisible 

It is extremely complex, fragile, and a major pain to use Airtable’s internal forms to update existing Airtable records. Airtable’s forms always create new records, they always require automations, they always require complicated prefill URLs, and those URLs are always required to change after each form submission.

If you’re trying to update Airtable records with a form, the easiest, quickest, simplest, most bulletproof, most customizable, most advanced, and most fully-featured way of doing this is to use Fillout’s advanced forms for Airtable.

Fillout is 100% free and offers hundreds (possibly thousands) of features that Airtable’s native forms don’t offer, including the ability to update Airtable records from a form. It even lets you update attachment fields directly from a form as well.

Fillout gives you one static & unchanging link per record that is used to update each record. No changing links, no complicated prefill URLs, no limitation on field types, and no automations are necessary.

Hope this helps! If you’d like to hire an expert Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld