1 2 Previous Next 15 Replies Latest reply on Dec 9, 2014 8:57 AM by samarthmkt



      9 Apr, 2013 9:36 AM (in response to MarkNZ)

      Re: Copy Fields from One to Another


      No; the Set Field line should read: Set Field [ TO5_CONTACTS::Title ; $Title ]. As shown you set a variable but then don't use it.


      To reiterate what I posted earlier, if you are transferring data between unrelated tables your script must include steps to ensure you navigate to the correct table and record to gather the data from in the first place. So your script needs to be something like this:


      Go to Layout [ “yourLayout” ( TELM_Contacts ) ]

      Go to Record/Request/Page [ yourNavigation ]

      Set Variable [ $dataToTransfer; Value: TELM_Contacts::Title ]

      Go to Layout [ “yourLayout” ( TO5_CONTACTS ) ]

      New Record/Request

      Set Field [ TO5_CONTACTS::Title; $dataToTransfer ]

      Commit Records/Requests


      Hello Friend Keyword,


      While Searching for the solutions of transfering stock record from one portal table portal row fields to another portal table portal row fields i found your above script and i tried for queries question. Its work well but there one issue occures while transferring the data. While the transfer record has been paste in the same portal row field record where previous record has been transfered.(Replace the previous record).I guess this script is for copy and paste records. I want to transfer all fields records of one portal row to another in add portal row wise ( Record shall be paste in next portal row of that related portal table.


          That script is not transferring into a portal but rather going to a layout based on the native table the portal records belong to and creating records there. Have a look at the sample file I posted on the other thread. If it still doesn't make sense for you, post again for clarification.


            Thanks Keyword

               I agree script tranfering data to the layout but it replaces the previous data while pasting. It should be placed in next portal row ot that table while tranfering the data. I have also tried by loop method but not uptp the mark. here is a temp file for your reference

            • 3. Re: tRANSFER PORTEL ROW RECORDS

              There are a number of issues with your file.


              1.     Step 1 of the script (go to layout) doesn't work because the layout you name doesn't exist

              2.     Because of 1. the go to related record step doesn't work either


              The above two steps alone are enough to make sure the script doesn't do what it is meant to do, but you have other illogical lines of script that also need fixing. Can you please clarify what data you are transferring, and from where to where. That would make it easier to assist you.

              • 4. Re: tRANSFER PORTEL ROW RECORDS

                Thanks Keyword

                  Actually i want to transfer stock from one location table field to another table field by entry wise. I have two location tables 1- Godown Location and 2- office location for stock inventory.First of all i have to make stock entry in godown orders portal table of particular item (Purchase from suppliers). Now i have to transfer this item to office order portal table to make stock inventory at office product stock location table by godown invoice data.


                • 5. Re: tRANSFER PORTEL ROW RECORDS

                  Hello Keywords


                    Yet By another thread now the records are transfering to another sucsses fully. But i have also set variable for another two more records which i have to transfer but only one record is transferring another two records are not transferring. May be i am somewhere wrong to put the correct script. In screen shots two field records are not transferring (Invoice ID And Second Date) In office product inventry inward  portal.

                  • 6. Re: tRANSFER PORTEL ROW RECORDS

                    Hi, samarthmkt.


                    I notice in your script that the only value you are carrying in your variable ($dataToTransfer) is the quantity.


                    You have three 'Set Variable' steps in your 'Step 3', but they all set that same variable. As a result, the first statement sets that variable to the invoice number, but the second statement overwrites the invoice number and resets it to the date, and then the third statement resets it again, this time to the quantity.


                    So when you're done, your $dataToTransfer variable is set to the quantity. You've lost the invoice number and the date.


                    Instead, use three variables: $dataToTransfer_invoiceID, $dataToTransfer_date, and $dataToTransfer_quantity. That way you'll be able to carry all three values simultaneously.


                    - Jim

                    • 7. Re: tRANSFER PORTEL ROW RECORDS

                      Thanks jimfeuerstein for your valuable reply.

                      • 8. Re: tRANSFER PORTEL ROW RECORDS

                        In addition to the error pointed out by Jim, note the error in the go to layout step in your script—you have it set to what appears to be a field name, whereas that step requires a layout name. For that reason the script does not navigate away from the layout on which it is initiated, and thus may not be collecting the data you want anyway.


                        I also notice in your script that you are trying to collect data from two different tables (ID and Date from an Invoices table, and Qty from an Invoice Data table). Since you first navigate to a portal row, this may also be an issue, but without further details it's hard to say for sure.

                        • 9. Re: tRANSFER PORTEL ROW RECORDS

                          Thanks I have notice your points and try to rectify..

                          • 10. Re: tRANSFER PORTEL ROW RECORDS

                            Hello Friend Keywords,


                            Yet I have tried your discuss points to rectify what i want to transfer the records but some how i have reached to the solution only some function is still missing to carry the records to the related item name field. I have two tables for items at diffrent location names Office and Godown.Both the location tables have same item names but the product IDs are diffrent.  Basically i have to transfer the Qty , Date field record of table godown of a item name from inventory outward (Invoices) to the office location TABLE inventory inwards (Orders) to the same name item name field. The Record is transfering but it is forwarding to the last record not in same name releted field name record.

                            • 11. Re: tRANSFER PORTEL ROW RECORDS

                              I am really not entirely clear what you are trying to do, but let me point out a couple of issues with your file.


                              1.     As previously pointed out, the Go to Layout step at the start of the script does no work because it is set to a field name, not a layout name. The consequence of this is that the script continues to run on the same layout where it was initiated. If the script was initiated by the button you highlight on Capture1 then it runs on the Godown Invoice Details layout.


                              2.     The next script step is Go to Portal Row. This also doesn't work since there is more than one portal on that layout: there is the line item portal in the middle of the screen (showing Godown Invoice Data records); then there is a portal on the Add Line Item popover button (showing Godown All Products records). If you have more than one portal on a layout and want a script to navigate to one of them the you must give the portal and object name and navigate to that object using Go to Object before the Go to Portal Row step.


                              3.     The first two variables you set come from the parent record (ID and date) while the third (Qty) comes from the first row of the line item portal, because that is how the variable is defined. (So even though the Go to Portal Row step has gone to the wrong portal it captures data from the other portal, but can only pull data from the first row of that portal because of its context.)


                              4.     Further down the script the Go to Related Record step doesn't work because (1) you have not selected the appropriate line item ID in the first place, and (2) you don't have the relationships set up correctly—as far as I can tell (your relationship graph is a mess!)


                              5.     Due to all the above you end up posting incorrect order data into your product details portal—i.e. the wrong product record, and also, I suspect, the wrong portal (surely it should be Inventory Outward?) again because you have not specified which portal to go to.


                              You will need to address all of these issues to get this working. Remember: context is king!


                              • 12. Re: tRANSFER PORTEL ROW RECORDS

                                Thanks Keyword for your points.

                                At point 4 how i can select the line item id. ? Though the item id for both tables are diffrent but item names are same.If you can help me to make changes in script (transfer Stock)as per your opinion it will be greatfull. Here is new file which i make changes as per your advice.

                                • 13. Re: tRANSFER PORTEL ROW RECORDS

                                  Rather than answer your specific question, let me just comment on what the question itself and this new version of your file shows—you really don't seem to have a clear grasp of what you are doing. In the script referred to in my previous post you have fixed Go to Layout, but are you now going to the right layout?  You have named an object in a Go to Object script, but on that layout there is no object with that or any other name, and also no portal. All that has done is muddied the waters even further and your script now does nothing because it can't.


                                  I suggest you forget the script, manually walk yourself through the steps you want to follow: go to this layout, go to this field, copy this data, go to another layout, find this record, go to this field, paste the data copied previously, etc. As you go along write down every step you take. Once you have successfully walked through the process once, then try to write a script that follows that process. Just remember that when you script it DON"T use copy and paste, but rather save the values you want to transfer as variables.

                                  • 14. Re: tRANSFER PORTEL ROW RECORDS

                                    Without reading everything in detail here, it seems to me that you are having the same information in 2 tables. That is, for each record, there is only a few differences in the values, but basically you have the same fields in both tables.


                                    Consider doing a consolidation of the 2 tables instead. The records can easily relate to several other tables and you could just create a seperate field for each table, they need to refer to.

                                    If a "portal row" needs to be transferred from one entity to another, just replace the foreign key on that portal record.

                                    If you need to copy, just go to a layout, tied to the "portal table", find the specific record, duplicate record, set the id for the new relation ship and clear the original key on the duplicated record and go back to your originally layout.

                                    1 2 Previous Next