Undesired copying of field content in a table caused by mouse dragging

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 16; OS: Windows 10.0 Build 26100; UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-US
Calc: threaded

Hello everyone,

The easiest way to describe my problem is with a picture, followed by a question:

image

If I click on one of the fields in either one of those two columns, with a left mouse button, and then drag it to another field and release the mouse button, then the content of that initial field is copied. My concern is that it is very easy to corrupt existing data by accidentally doing such move. How are these issues usually mitigated?

What is the problem here: The mouse pointer will show (+), because the marked content will be copied. The content will be inserted if target field could save the new content. Text, for example, wouldn’t be tried to insert in a field, which only could save integer values.

This is the same behavior as it is in all apps: Mark a content and while pressing the mouse moves the mouse is used for copying.

If you don’t want to edit existing rows set the properties of the form so data couldn’t be changed.

Well you appear to have defined two text or varchar fields next to each other, so of course this could happen if you’re not careful.

Depending on the db engine, you can integrate checks for field values so that the database would only accept certain values, but this requires some thought, and wouldn’t prevent the copy-paste behavior per se, just the end result of the data not being accepted by the database. This might be a sufficient mitigation for your use case.

Read up on the documentation of your db engine for Checks or Constraints to find out whether it offers something of use.

In essence I see three potential solutions here:

  1. What @RobertG is suggesting, which would be to change the way the form behaves. Thank you for this suggestion.
  2. If it’s possible at all, completely annul that event.
  3. On the MySQL side “revoke” privileges for ‘insert’ and ‘update’, which would subsequently be “granted” back by another event such as “keyboard or mouse press”.

With respect to the checks and constrains, I am not certain that it would be a viable solution in my scenario as ‘name’ or ‘model’ can be null, and they can be both alpha numeric.

Don’t use the Table Edit GUI, instead use Base Forms, Forms give you better control over your edits and more formatting options The Form Wizard makes creating a form from your table relatively easy.
Working with Forms

This is on a base form.