Hi Alteryx Community!
Is there a way to sort with logics?
Sample data

Output data
for example, column A, those numbers that are 10 digits like 2 thru 4 will stay on the top. Then if column B if 1000 = 1000 from column A, then move the whole row below row 5 and repeating for the next list.

I'm sorry, I don't even know what this type of sorting would call.
The sample Data is based off what I've already constructed in the workflow as seen below, but then I get stuck toward the end at the sorting

Appreciated any input.