Jul 25, 2023 03:35 AM
I can add a button on my interface page that navigates (go to interface page) to a form. However, I'd like to set a field value (within that form) based upon current focus.
The application is an ideas board so I'm focused on Idea A (main page) and I navigate to a voting table (form) but I want to pass idea A to that form.
So I'm thinking I need to associate the button with a script but cant find example code for this application eg interface page navigation. Can anyone point me to an example?
Solved! Go to Solution.
Jul 25, 2023 10:32 PM
Nah, you don't need a script and can just use a formula field for it. Check out the "using formulas to create prefilled urls" part of the guide
Jul 25, 2023 07:09 AM
You can do it via URL parameters, so something like this works fine:
https://airtable.com/appOyKD7rqgwlXMm4/pagfZ4skZwMZFHQ2M?prefill_Name=Test&prefill_Status=Todo
Resulting in:
And the syntax is the same as the normal form prefills
Jul 25, 2023 08:35 AM
Thank Adam,
great to know you can suffix a URL to prefill forms. In my case I'd like the 'idea' value (Todo in your example) to be variable based upon an Airtable interface page employing a record review layout. So I'm thinking I'd need to create a script which would get the currently selected record (from the record review layout) and dynamically create the URL employing that record name?
So (with limited coding knowledge) was looking for an Airtable script example for that scenario.
Jul 25, 2023 10:32 PM
Nah, you don't need a script and can just use a formula field for it. Check out the "using formulas to create prefilled urls" part of the guide
Aug 01, 2023 04:25 AM
Apologies for delayed response. I have followed your advice and I now have a field that formulates the required URL for a pre-filled form. my next challenge is how to employ that field with an Airtable interface page employing a record review layout. My vision was to add a button to the interface that would take me to the form prefilled based upon the record currently selected in the interface. I cant see any way to do that with the standard button configuration or an associated automation?
Aug 01, 2023 04:38 AM
Sorry I missed the button option 'go to URL in record'. Doh!