AnsweredAssumed Answered

Problem with copy and paste records

Question asked by davidel on Sep 25, 2009
Latest reply on Sep 27, 2009 by davidel

Title

Problem with copy and paste records

Post

Dear All,

 

      I have big problem with copy and paste records from one portal row to another portal row.

I would like to know if anyone could help me solve this problem.  I am on small project to develop inventory system

for my company.  The basic idea of this system is that there are supplier, customer and parts table

and also Order table (purchasing from supplier),Invoice table (invoicing to our customer), and

Inventory table (Inventory data such as turnover stock, product age, stock in hand).

 

          I want this system works where everytime we input parts data into the order table, it added the

data to the Inventory table so that the stock in hand data will be increasing.

Everytime I setup invoice for our customer (Invoice table), particular parts in inventory table will be deleted.  

 

          Inside the order table/layout, I have a portal row called orderline where everytime we receive

parts, we input incoming parts data (Part number, ID number/serial number, Qty, Price) in this

orderline (portal row in the Order table). By using script, this incoming parts (ID number, Qty, Price)

is copied into the inventoryline (portal row in the inventory table/layout).  When I issued an invoice,

ongoing parts data(Part number, ID number/serial number, Qty, Price) is input in the Invoice line

(portal row in the Invoice table/layout) and at the same time the particular data inside the inventoryline

is also deleted. Since price for the same product (same Part number) might be different due to Yen/Euro

conversion at the time the product was purchased, so everytime we issued invoice, we have to make sure

that the correct IDnumber/serial number is input in the invoiceline.

 

          Now, I have setup script to copy incoming parts in the orderline to the inventoryline, but

it only copied the first row of the data. It did not copy the second row of the data in the orderline.

I have attached the script below for your reference.  I really appreciate for your help and advice.

 

Best Regards,

 

 

------------------------------------------------------------------------

Input stock Qty script

 

Set error capture on

Enter browse mode

Go to Layout (ELorder (ELorder))

Go to field (Elorderline:partnumber)

Go to portal row  (select first)

Select All

Copy () (Select)

Go to Layout (ELInventory)

Enter find mode ()

Go to field (Elinventory:partnumber)

Select all

Paste () (select)

Set Selection ()

 

Enter browse mode

Go to layout (Elorder)

Go to field (ELorderline:ID Nr)

Go to portal row (select first)

Select all

Copy ()  (select) 

Go to layout (ELinventory)

Go to field (Elinventoryline: ID Nr)

Go to portal row (select first)

Select all

Paste ()(select)

 

Go to layout (Elorder)

Go to field (Elorderline: qty)

Go to portal row (select first) 

Select all

Copy () (select)

Go to Layout (Elinventory)

Go to field (Elinventoryline : qty)

Go to portal row (select first)

Select all

Paste () (select)

 

Go to layout (ELorder)

Go to field (ELorderline: price)

Go to portal row (select first)

Select all

Copy () (select)

Go to layout (Elinventory)

Go to field (Elinventoryline: price)

Go to portal row (select first) 

Select all

Paste ()  (Select)

 

Loop

    Perform Script (input stock loop)

    Go to  Record/Request/Page (Next: Exit after last)

End loop

 

----------------------------------------------------------------- 

Input stock loop script 

 

Set Error Capture (on)

Enter browse mode

Go to related record (from table Elorder using layout current layout)

Go to field (ELorderline: product number)

Go to portal row  (Select next)

Select all

Copy() ( Select)

Go to Layout (ElInventory)

Enter find mode ()

Go to field (Elinventory:product number)

Select all

Paste () (Select)

Set selection ()

 

Enter browse mode

Go to related record (from table Elorder using layout current layout)

Go to field (Elorderline: ID Nr)

Go to portal row (select next)

Select all

Copy () (Select)

Go to related record (from table Elinventoryline using layout current layout)

Go to field (Elinventoryline: ID Nr)

Go to portal row (select next)

Select all

Paste () (Select)

 

Go to related record (from table Elorder using layout current layout)

Go to field (Elorderline: Qty)

Go to portal row (select next)

Select all

Copy () (select)

Go to related record (from table Elinventoryline using layout current layout)

Go to field (Elinventoryline : Qty)

Go to portal row (select next)

Select all

Paste () (select)

 

Go to related record (from table Elorder using layout current layout)

Go to field (Elorderline: price)

Go to portal row (select next)

Select all

Copy () (select)

Go to related record (from table Elinventory using layout current layout)

Go to field (Elinventoryline : price)

Go to portal row (select next)

Select all

Paste ()  (select)

 

Outcomes