Help

How to create new record with prefilled data?

1289 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Eric_Shank1
4 - Data Explorer
4 - Data Explorer

Records in my Questions table are linked to a certain view within my Answers table.

While viewing the Questions table, I want to create a record in Answers linked to the question. this is easy with the little “+” sign.

But I want to create the new Answer record with pre-filled fields so that it matches the view to which it is linked. This would be similar to creating a record while viewing grouped records… it prefills data to match the group. Is there any way to do this?

1 Reply 1

Welcome to the community, @Eric_Shank1! :grinning_face_with_big_eyes: There’s a new scripting action beta feature that could probably help. It can be triggered by a new record being added to a table, which would be the [Answers] table in your case. The new record could be sent to the script, which would check the [Questions] table to see which view is active (using the newly-added cursor feature) and update the new [Answers] record appropriately. (I just read about this new cursor option earlier today, and the docs say it’s for the scripting block only, so I’m not sure if that also includes the scripting action beta. I don’t have time right now to run a test, but I’ll do so tomorrow and report back.)

EDIT: I ran a quick test, and it doesn’t appear to work in the scripting action beta, even though cursor shows up in the API docs inside the script editor for the beta. I’ll have to report this oversight. It looks like the active table and view info is only available in the scripting block, where scripts must be manually triggered. With that in mind, you could make the link and add the new record, and then trigger a script to find that new record and update it accordingly. That’s probably the best you can do at this point.