Your script looks like you're leaving the layout with the portal on it. You won't be able to grab values from the portal.
Instead of walking the portal rows, why not use go to related records to isolate the related records on a layout based on the same TO as the portal, collect the data into variables (or method of your choice), go to your SQL table and create your records.
Thank you for your prompt reply.
Could you please give me a rough idea by script,
This does not create an array, or a 3 column list, but one long list with first all values from CustomPropertyId, followed by the values from CustomPropertyName and then the values from CustomPropertyDescription
So when you do this:
GetValue 1 will always get you the first value from CustomPropertyId
GetValue 2 will always get you the 2nd value from CustomPropertyId
GetValue 3 will always get you the third value from CustomPropertyId
It will do that for all records in your loop.
So what you need is 3 lists, one for each field
and your GetValue() call has to call the nth value from each list, n being the iterator in your loop.
+1 on this. GTRR is your friend.
-- sent from myPhone --
Sounds like you have a related set of records showing in a portal and you want that set of records imported into an SQL version of that related table. If this is correct then its relatively easy.
Create a Layout for each TO (Table Occurrence) used in the script, 3 total. You already have the first one, main table, and probably the second, portal records, and maybe the third, SQL table.
Use a Go To Related Records from the main table to the related portal records. This should result in a found set on a different layout showing the related records from the portal.
Change layouts to the one attached to the SQL table. (Not strictly required but it helps to see the results).
Perform an import from the TO of the related table to the TO of the SQL table.
So in three script steps you have transferred the portals related records into the SQL table.
GTRR showing on layout of the related table.
Change Layout to SQL table
Import from TO of related table to SQL TO
Thank you all for your help.
I managed to get it to work