Ask Your Question
0

onclick copy, ondbclick paste LO_Base

asked 2019-10-09 17:59:17 +0200

normanos gravatar image

Firstly i.m absolute 0 in Macros. As suggested in LO documentation, best is to start with ready solutions. This is only about LO Base. So wish to ask is it possible to get macro witch do like this: on mouse click its copy row in one table and then on mouse double click its paste that row in other table/query?

I seen it long time ago in MS Access, but is it possible in LO?

Thanks!

edit retag flag offensive close merge delete

Comments

@normanos,

In future along with OS used (should be more specific), please include specific LO version and with Base, the database used and related info (connector, version) if applicable. This most often comes into play when answering questions.

Ratslinger gravatar imageRatslinger ( 2019-10-09 20:39:26 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2019-10-09 20:43:32 +0200

normanos gravatar image

updated 2019-10-11 08:59:41 +0200

Thanks, buts NOT that, what im looking. Looking for macro where can copy and paste with mouce click and double click. How to use mysql i know, but i dont know how to make macro for mouse click and double click. Sorry Ratslinger, but You didnt read my post properly.

Linux Debian 9 LO Version: 5.2.7.2 and using mysql db, connected directly.

edit flag offensive delete link more

Comments

Please do not post additional information in an answer. Answers are to respond to original question. Either edit original question with the information or use add a comment.

Please delete the answer & re-post correctly.

Ratslinger gravatar imageRatslinger ( 2019-10-09 20:54:25 +0200 )edit

@normanos,

Don't believe you read either my answer correctly or my comment above. Please delete & re-post your answer as a comment or edit original question and add information there noted as edited.

My first sentence of the answer is what you want and actually answers your question. Yes, did read your question correctly. It is a macro which needs to be specifically written to your needs. There is no universal macro to do this. Since you do not provide specifics or even a sample to work with the answer also provided the 'practical' alternative.

Ratslinger gravatar imageRatslinger ( 2019-10-11 18:01:35 +0200 )edit
0

answered 2019-10-09 20:51:58 +0200

Ratslinger gravatar image

Hello,

Using a macro in this situation would need to be specifically written for your situation. The practical solution is simply a SQL statement. This requires an Insert statement so cannot be done in Query section but rather from menu Tools->SQL....

The actual statement depends on the from and to fields and db being used. For most situations here is the format:

INSERT INTO "Your Receiving Table Name"  (List of fields to be inserted)  SELECT  `List of fields selected for insertion` FROM "Table selected from"  WHERE "Field name for selection" = `Value to be selected`

Because there is no provided information, consider that you must insure a unique key must be maintained. This may be handled by an auto increment field or it can be a fixed value in the select statement.

For more information on the Insert statement please refer to the documentation of the database you are using.

NOTE: You do not "paste" records into a query!

edit flag offensive delete link more

Comments

Have tested with MySQL JDBC connection. Field & table names surrounded with back ticks.

Ratslinger gravatar imageRatslinger ( 2019-10-09 21:07:33 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-10-09 17:59:17 +0200

Seen: 21 times

Last updated: Oct 11