0

Creating record from another table

Try to create a record via button from another table (T2), where values of fields (of this T2) automatically been put into respective fields in T1 ...

fe. value of 'field_weight_T2' should then be in 'field_weight_T1'

all i know is 

create T1

would be thankful for ne or the other tipp

thx

1 reply

null
    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    Example code to do this :

    let value1 := 'field_weight_T2';
    let value2 := 'field_size_T2';    (for example if you have a second field 'size')
    let i := create T1;
    i.('field_weight_T1' := value1;
       'field_size_T1' := value2);
    openRecord(i)                     (this line is optional if you want to open the newly created record)
    

    Hope this gets you on the road. Don't hesitate to ask if you have more questions.