Save view ordering to field

Saves the record ordering of a particular view to a specified number field in the table

Sign up

The use case for the script is for when you have a table where record order is important and you manually order the records in one view and then want to update other views to match that ordering.

The script saves the ordering from the specified view to the specified numeric field on the table. You can then sort other views on that field and thereby match the order to the order of the source view at the point you ran the script.

The script expects config inputs specifying the table, the source view whose ordering you want to save and the field you want to save the ordering to, which must be of type number. You must have a number field as the target field to save the ordering to but there are no other schema requirements.

The script updates the value of the target field for every record in the source view. It does not update any records that are not in the source view.

View source