I have been enjoying implementing the action buttons on to my blocks, and although there are some tweaks still needed as they roll out, there is one function I wanted to flag.
I have a table block that is connected to a linked field being pulled from a list-details block. The table therefore only shows the record that is in the list details block and was originally chosen from the list block.
List Block → List Details → Table (linked records)
The update action buttons nicely link to the record it’s next to and is pre-filled. However, I would like the ADD ACTION button to also connect to the record that the table is filtered by so when I add a new record to the table, the parent record is pre-filled so the user does not have to go back or scroll through hundreds of records (or choose something they don’t have permission for).
Any thoughts on making this work, or is this a feature request?
At the moment it’s not possible to achieve with the action buttons, since they don’t have a hidden field in the settings.
But I would suggest creating a Form block on the same page with the List details block and grab the recordID of the List details record with the hidden field, as a result the users won’t need to select it from all the fields.
If you want to keep a nicer UI (open a Form in the modal from the Table block), here is what I would suggest doing:
I would create a new page with a Form block that you would like the users to be able to submit with hidden fields to grab the recordID of the List details item too. Since the Form block is on the new page, we need to add a recordID to the URL to the Form block, so the hidden field works. Here is how I would do it →
On the Airtable table to which the Softr Table block is mapped, I would add a Lookup field and would bring the recordID of the List details table.
I would create a new Formula field with the Concatenate formula with the following logic: CONCATENATE('https://YourSoftrApp.softr.app/Path_to_The_Form_page?recordId=', Lookup RecordID (from the List details table))
Where instead of https://YourSoftrApp.softr.app → use your app domain
Path_to_The_Form_page → use the path to the page where the form block from step 1 is created
Lookup RecordID (from the List details table) → Is the lookup field with List details recordId from Step 2
As a result each item that should be shown on the Softr Table block will generate a URL to the Form with a recordID with the corresponding List details item
Then I would create an Open URL action button on the table block and would map it to the URL generated with Formula from step 3
As a result you would be able to open the Form in the modal that will collect the hidden field of the List details item the Table block is located on.
Hope the description makes sense.
Quick question - I want the button to only appear once at the top of the table, like the “New Record” action button. @RyanRad - do you have a screenshot of your workaround? I don’t want the add button to show up on each item on the table, but only once at the top of the table.
Let me know also @Viktoria if I am reading your workaround correctly - trying to picture this.
@SAS_AT To be honest, it’s not possible to add this kind of button on top of a Table/List block, since the Topbar button Open URL action can’t be dynamic, thus it won’t be changed depending on the List details item.
I would suggest using the Item button and add the button for each item on the Table block.
Ah yes - I would not want to add the ADD button into the table block for the task table (since it’s to add a new task to the parent project) but I could add a button to add a task to the list details block above the table which can be a dynamic URL, and remove the add button from the table and then update the table when the hidden field option is added.
Does that make sense?? Thanks for helping me think through it!
@Viktoria - Update: I was able to make this solution work! However, I think there is an easier way, combining the simplicity of both your options. Have the form on a new page but also include a list-details block to pull in the record, which also enabled me to bring in data from the linked project
I found this accidentally because I wanted not only to connect the form to a record, but also pre-fill that record name at the top of the form. Your team made the suggestion for the details block on the form page to add the name and then I realized I could use a direct button link from the record page list-details block to the form page with the list-details block and it would pull in all the record info without a custom URL, and all I still needed was the hidden field.