0

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

null
    • Alain.1
    • 4 yrs ago
    • Reported - view

    And in different tables..

    • JGM
    • Jose_Monteiro
    • 4 yrs ago
    • Reported - view

    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.

    • JGM
    • Jose_Monteiro
    • 4 yrs ago
    • Reported - view

    Of course you can create as many buttons as you need for diferent purposes.

    • Nick
    • 4 yrs ago
    • Reported - view

    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)

    ---

    • Alain.1
    • 4 yrs ago
    • Reported - view

    Thanks a lot. Have a nice day👍🏻👍🏻

Content aside

  • 4 yrs agoLast active
  • 5Replies
  • 1263Views