Copy table (t1) and subtables(s1 and s1.z1) from other table (t2) and subtables (s2 and s2.z2)
I want to copy T1 and all its sub-registries from S1 and Z1 in to tables T2.S2.Z2
I can copy S1 to S2 but
I don't know how to copy table z2 related to S2.
Can someone help me?
I'm leaving a link for you to download the base I'm working with.
https://www.dropbox.com/s/0cfeh5hvmcgoorm/DEMO%20RG.ninox?dl=0
I show the code I execute to copy from one subtable to another. from table S1 to table S2
let t := this;
let c := refT1;
for r in select S1 where T1 = c do
lt2 := refT1.lt1;
let st := (create S2);
st.(descs2 := r.ls1);
st.(T2 := t)
end
thanks!!
1 reply
-
Dear Roberto,
For this you will need to create a double for loop. Please try the code below (adjusted to your case)
let t := this;
let c := refT1;
for r in select S1 where T1 = c do
lt2 := refT1.lt1;
let st := (create S2);
let myS:= st.this
st.(descs2 := r.ls1);
st.(T2 := t)
for i in select Z1
let newz := (create Z2);
newz.( S2:= myS)
end
end
You are also welcome to send us an email at support@ninox.com or schedule a screensharing meeting with the support team https://ninox.com/en/support
Content aside
- 4 yrs agoLast active
- 1Replies
- 654Views