Copy data.
Hello, I would like to transfer a data from one field to another fiels by pressing a button. In the same table.
Thank you for your suggestions
5 replies
-
And in different tables..
-
Not an expert (yet; but some day who knows :).
Suggestion:
In a Table, the one you are using or perhaps in a new one for the purpose of having these kind of buttons:- create a new view (Form type)
- Add a Layout element (A button)- In Admin mode open the Button panel and in the "on click" field write the code you need to be executed when you click the button.
It can be any kind of valid code, as copying data from one field to another or whatever you need. -
Of course you can create as many buttons as you need for diferent purposes.
-
To copy data to another field:
---
Field4 := Field1;
Field5 := Field2
...and so on
To copy data to another table:
---
let f1 := Table1_Field1;
let f2 := Table1_Field2;
let f3 := Table1_Field3;
let c := (create Table2);
c.(Table2_Field1 := f1);
c.(Table2_Field2 := f2);
c.(Table2_Field3 := f3)---
-
Thanks a lot. Have a nice day
Content aside
- 4 yrs agoLast active
- 5Replies
- 1268Views