The second script should work. I suggest putting a pause after the sort records so that you can check and see what order you are actually getting. Perhaps you are sorting on the wrong field or the field is text when it should be number (Though then, I'd expect to see your portal fail to sort records correctly.) And perhaps your current layout is not based on the table "EquipmentUsage"? That would also cause this to fail.
The current layout is based on a parent table (Content) and EquipmentUsage is a child table linked by ContentID displayed in a portal in the layout. One record in Content is selected, and the correct records are displaying in the portal, and the serial numbering is being done on those records, but apparently, the Sort Records step is not controlling the order of the serial numbering. The second version was just to create a second field to make it easier to see what's happening. Both UsageOrder and TempOrder are numeric.
Which explains the problem as you are on the wrong layout for your script.
You aren't finding EquipmentUsage Records with your find matching records step. You are finding Content records. The same goes for your sort, it sorts Content records not EquipmentUsage records.
Try it this way:
Go To Related Record [Show only related records; From table: EquipmentUsage; Using layout: "EquipmentUsage" (EquipmentUsage) ]
Replace Field Contents
Go to Layout [Original Layout]
Many thanks! This worked.