mathesar icon indicating copy to clipboard operation
mathesar copied to clipboard

Feature to define ephemeral default values for rapid data entry

Open seancolsen opened this issue 9 months ago • 5 comments

I was chatting privately on Reddit with a prospective user (the author of this thread) who relayed the following feature request:

Something we haven’t seen yet is a sort of “field prepopulation”

Currently I semi-provide this functionality as a default value in a database column. That doesn’t completely meet their needs though.

I guess they want the ability to “freeze” a value inside a cell as they’re imputing rows.

Given 8 out of 10 rows might be the exact same for several rows they’re choosing to input one-by-one. They want an easy way to only need to modify those two rows.

A default value doesn’t meet that need because their ideal “frozen” value might change. Ideally, it should be baked into the front end and not the database.

I think this is a good idea. I've had this need before with other products. Let's pretend you're doing manual data entry to insert "donation" records. You have a stack of 20 checks. Each time you enter a new donation record you need to indicate that the payment method is "Check". It would be faster if you could somehow temporarily mark that payment method field a "sticky" during the data entry process so that the next record you enter retains that previously-entered value. Other fields like "amount" should not be sticky though (in order to prevent data entry errors). The feature needs to be manually configurable each time the user begins data entry. Perhaps after some time elapses, all fields revert back to their original default values. I can imagine many different ways to design this feature, so I've left this ticket in draft state and relatively open-ended.

seancolsen avatar Oct 04 '23 14:10 seancolsen

May I suggest one possible implementation:

1: Provide the option via right-click menu: image

2: Indicate that new rows will be prepopulated by showing the value at the bottom (in grey / translucent font): image

3: Provide an easy way to unfreeze the value via the right-click menu: image

MrChadMWood avatar Oct 04 '23 14:10 MrChadMWood

Thanks for this suggestion, @MrChadMWood!

seancolsen avatar Oct 04 '23 14:10 seancolsen

One way to accomplish this currently is to use the default value option for a column. You could set the default value, and it would then be used for any subsequent data entry. You could then un-set it when you no longer need it. Categories_User_Research_Mathesar

Edited to add: I just saw the note above that says the default value doesn't meet the need, sorry for missing that. I'll leave this comment up in case it's useful to anyone else who stumbles on this issue.

kgodey avatar Oct 04 '23 17:10 kgodey

@kgodey (In my case) Explicitly setting a default value in the database doesn't work because my users want to be able to easily remove / change the default value often (during the process of data entry) -- The usefulness of the default value is scoped to maybe a 15 minute period of time when they are imputing data.

Your suggested solution seems to work fine though -- as my users would have access to that option.

MrChadMWood avatar Oct 04 '23 21:10 MrChadMWood

Coming back to advise the suggested solution actually does not fit my use case. My users will have the Editor role, as they should not be performing any kind of schema changes. The option to set a column default value is not permitted to this role -- so my users will not have access to it for speeding up their workflow when they are imputing data.

Maybe this means the existing functionality is actually altering the database column, I'm not sure. I think what we're looking for is a sort of "superficial" default value for a column -- maintained by the frontend UI (stored in memory).

MrChadMWood avatar Oct 11 '23 21:10 MrChadMWood