Skip to content

cRecord.SetFieldOrder

Brendon edited this page Mar 17, 2024 · 1 revision

SetFieldOrder

returns long

accepts (fieldName as String, FieldOrder as Long)

Specifies the ordinal number of a field within a cRecord. You pass it a fieldName and an order number. If it finds the fieldName in the list of fields it then proceeds with adding the field. If the ordinal number supplied is larger than the number of fields in the record then it is assumed you want to place the field in the end position.

The method then rebuilds the field collection in the order it originally was, but with the specified field going into the new order position.

If the method cannot find the field it returns -1, otherwise it returns the order number the field ended up in. This would be the same as the order you specified, unless that number was larger than the number of fields, in which case it will be the order number of the last field.

See also: cDataTable.SetFieldOrder, cRecord

Clone this wiki locally