Load (Transfer) Data
There are any way to Load (transfer) data for one table, to a Reference 1:N on other table, with a Button.
19 replies
-
You can duplicate the table.
You can create a link between the two tables and just reference the records you need.
You can create a button that creates the new records and copies the data.
-
Hi Rafael
You are doing everything right, but you are not creating the link, Try something like this
do as server let xPry := first(select 'Control Issues'); let xFld0 := xPry.Date; let xFld1 := xPry.Week; let xFld2 := xPry.Document; let xFld3 := xPry.'Rev A'; let xFld4 := xPry.'Rev B'; let xFld5 := xPry.'Rev 0'; let Pgr := (create 'Issues Week'); <-- No need for 'Control Issues_' here Pgr.('Control Issues_' := xPry); <--- This line creates the link Pgr.(Date := xFld0); Pgr.(Week := xFld1); Pgr.(Document := xFld2); Pgr.('Rev A' := xFld3); Pgr.('Rev B' := xFld4); Pgr.('Rev 0' := xFld5) end
Regards John
-
Hi Rafael
Can you post screen shots of the field structure of the two tables. I want to see what the relationship is between the two.
Thanks John
-
Rafael said:
Need to Load the info on 'Control Issues' Table on 'Issues Week' Table on Reference 1:N 'Control. Issues_You should have a field in each of the Control Issues records called Issues Week, or whatever you call. Since you are creating the link after you have created the sub-records, what field in Control Issues can you use to match in Issues Week?
The image of Issues Week only have 1 record. Will you have more? or will all records in Control Issues link to this one record in Issues Week?
-
Fred John Halls
Other example. Maybe more clear I suppose
Table 'Progres Cost Report' This table is generated with a Script every Friday, (With a Button the data is eliminated and it is generated again with the data of the new week).
I have another table 'Print Progress' link to 'Progress Cost Report' 1:N the name of reference is 'Progress Report to Print'. The problem is where every Friday I generate the report 'Progress Cost Report' the data on 'Progress Cost Report' lost in the info on 'Print Progress' and should somehow update this table. The idea is Load again the data with a Button the field are the same in both tables.
The idea is to Print the 3 reports
I hope understand the idea.
-
Rafael said:
I've given this so much thought that I don't see it.Open a record in 'Control Issues', you will see the filed 'Issues Week'. It is empty. Click on it and select the only record available. You have now created the link.
Now go to Issues Week and open the only record. You will see that record in Control Issues is now linked to the only record in Issues Week.
Is that what you want?
-
Rafael said:
In the end I solved it via Bulk Edit. I image that is no possible to sequence the Bulk Edit in a Script to ad on a buttonThis solution is for after the records in Control Issues have been created.
I don't know what you have planned for the future. Is Issues Week a dashboard or will you be creating new records that are linked to records in Control Issues.
If Issues Week is a dashboard then all you need to do is add the following to the Trigger on new record for Control Issues:
'Issues Week' := 2
If you plan on creating new records in Issues Week then:
1) if new records in Control Issues are scripted then you need to change the script that creates the Control Issues records and add a part that creates the Issues Week record first then links to the Control Issues records that are created.
2) if you manually create records in Control Issues, then the easiest way would be to start in Issues Week, create that record then through the new Issues Week record create the Control Issues records.
-
Rafael said:
2- Then with the other button Create All Transmital generate again the info on 'Control Issue' with the all Documents.
3- When the Control Issue Table is update, need the Issue Week update too.Just to clarify, you don't plan on deleting the one record in Issue Week? If you don't plan on deleting the record, then do the option I suggested about the Trigger upon new Record. So whenever you create a new record in Control Issues they automatically get linked to the 1 record in Issues Week.
Content aside
- Status Answered
- 1 yr agoLast active
- 19Replies
- 158Views
-
3
Following