lamine_d

Looping in a portal and insert data into a table in SQL

Discussion created by lamine_d on Sep 26, 2014
Latest reply on Oct 1, 2014 by lamine_d

Hi there,

I have a portal in FileMaker 13 and would like to transfer its data to an SQL table using ODBC.

I have the following script, it does work but only for the first record, it does not go to th next records in the portal.

I have passed the values of the Portal as Parameters in the script (List(SelectedCustomProperties::CustomPropertyId;SelectedCustomProperties::CustomPropertyName;SelectedCustomProperties::CustomPropertyDescription)

Go to Object [Object Name: "SendToSQL"]

Go to Portal Row [Select;First]

Loop

Go to Layout["SQLTable Layout"] -> this layout is actually the table from SQL but coonected through ODBC

New Record/Request

Set Field(SQLTable::PropertyId;GeValue(Get(ScriptParameter);1;)]

Set Field(SQLTable::PropertyName;GeValue(Get(ScriptParameter);2;)]

Set Field(SQLTable::PropertyDescription;GeValue(Get(ScriptParameter);3;)]

Go to Portal Row [Select;Next;Exit after last]

End Loop

 

Am I missing anything?

 

Your help is much appreciated.

Regards

Lamine

Outcomes