![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I have the following two tables, which I would like to merge into one table. Table 1: Table 2: Invoice header Invoice lines Containing: Containing: Invoice number Invoice number Name Item Street Item serialnumber City Quantity The new table should contain one record per Invoice number containing: Invoice number Name Street City Item [20] Item serialnumber [20] Quantity [20] Can anybody make a script or other solution that can make the merge? |
#3
| |||
| |||
|
|
Can anybody make a script or other solution that can make the merge? If "Quantity [20]" means a field with 20 repetitions, then the answer to your question is "JUST SAY NO!!" |
#4
| |||
| |||
|
|
Hi I have the following two tables, which I would like to merge into one table. Table 1: Table 2: Invoice header Invoice lines Containing: Containing: Invoice number Invoice number Name Item Street Item serialnumber City Quantity The new table should contain one record per Invoice number containing: Invoice number Name Street City Item [20] Item serialnumber [20] Quantiy [20] Can anybody make a script or other solution that can make the merge? Thanks Daniel Why on earth would you want to do that? |
#5
| |||
| |||
|
|
The new table should contain one record per Invoice number containing: Invoice number Name Street City Item [20] Item serialnumber [20] Quantiy [20] Can anybody make a script or other solution that can make the merge? Why on earth would you want to do that? And what's up with table 2? |
#6
| |||
| |||
|
|
Can anybody make a script or other solution that can make the merge? If "Quantity [20]" means a field with 20 repetitions, then the answer to your question is "JUST SAY NO!!" Hi Harry Do you have a solution to adding the fields to one table in another way. E.g. adding each line to a field - item1, item2, item3... |
#7
| |||
| |||
|
|
Go To Record / Request / Page [First] Loop Go To Portal Row [By Number, 1] Set Field [Item1, RelatedFile::Item] Set Field [Quantity1, RelatedFile::Quantity] ... Go To Portal Row [By Number, 2] Set Field [Item2, RelatedFile::Item] Set Field [Quantity2, RelatedFile::Quantity] ... Go To Portal Row [By Number, X] Set Field [ItemX, RelatedFile::Item] Set Field [QuantityX, RelatedFile::Quantity] Go To Record / Request / Page [Next, Exit After Last] End Loop |
#8
| |||
| |||
|
|
You are a "helpful" genius Helpful Harry!!! :-) I implemented your code like this, is that the right way? (The portal consists of 20 rows and 2 columns) Go to Record/Request/Page [First] Loop Go to Portal Row [No dialog;1] Set Field [Fakturaer::Varenr1; Linie::Varenr] Set Field [Fakturaer::Antal1; Linier::Antal] Go to Portal Row [No dialog;2] Set Field [Fakturaer::Varenr2; Linie::Varenr] Set Field [Fakturaer::Antal2; Linier::Antal] Go to Portal Row [No dialog;3] Set Field [Fakturaer::Varenr3; Linie::Varenr] Set Field [Fakturaer::Antal3; Linier::Antal] ... Go to Portal Row [No dialog;20] Set Field [Fakturaer::Varenr20; Linie::Varenr] Set Field [Fakturaer::Antal20; Linier::Antal] Go to Record/Request/Page [Next; Exit af last} End Loop I am just faced with a single problem, if the record is empty it keeps copying the last record into the new fields. E.g. Portal New records Varenr. Antal Varenr. Antal 7000 2 Line1 7000 2 3000 2 Line2 3000 2 2700 3 Line3 2700 3 Line4 2700 3 Line5 2700 3 How can I make it test whether the portals row is empty and if so make it jump to the next record via "Go To Record / Request / Page [Next, Exit After Last]? |
)![]() |
| Thread Tools | |
| Display Modes | |
| |