Option to Add a New Row Directly as a Card

Hi, I’m aware that with Grist you can directly go to view a card by using the space bar. However, there doesn’t seem to be an option to add a new row as a card. Maybe an icon like a plus button or something similar and when you click it a a blank card appears.

This isn’t exactly what you are asking, but related: there is a recently added experiment to show a “New record” button at the bottom of the active view, which you can enable by adding ?experiment=newRecordButton to the URL of your document.

It doesn’t open a card, so you still need to hit Space to get there. But the reason it’s an experiment is to collect feedback. You can add your feedback as comments here: "Add new record" button · Issue #366 · gristlabs/grist-core · GitHub.

1 Like

I had a related idea. Imagine having a field type of “button”, defined like a button widget, but displayed as a button that fills the field, using the configured text and background colors.

It could be shown in table views, but would be most useful on card views, allowing much better layouts than the current button widget approach. In fact, you could make panels with just button fields if you don’t want a card view.

Even better would be the ability to run arbitrary code, not just insert / update / delete statements, but that’s a small incremental benefit compared to the “field becomes a button” feature.

Does this seem practical?

We are interested in it too! The difficulty is in running arbitrary code, or even running the kind of code that “Action Button” widget allows. Grist restricts code for security reasons: formulas run in a secure Python sandbox; custom widgets run in an untrusted iframe with only a specific API exposed. It’s hard to reconcile the two or to offer a convenient way to express actions (even simple ones like insert/update/delete; e.g. the way to do it with Action Button is really awkward and unfriendly). We’d like to base such functionality on the formula approach (so that actions can easily refer to other values in the data, and can be expressed in Python like other formulas), but that’s quite a bit of work and it’s not yet scheduled.