Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here

Sorting from url issue

8 - Asteroid

I have a workflow that has worked wonderful for the time I've been using it. Except now. It scrapes a listing of url links from a directory, sorts by descending and then I use select to grab the first entry. Which should be the most recent one. 


Though now it is putting January on the bottom of the list instead and keeping December 31 as its most recent. Starting from December (down) all the dates align perfectly until I get to the end of the data (90 days worth).




These are the examples of the childurl pull after sort by descending:


Bottom of the sort, containing the recent files I want to pull into Alteryx

Bottom of the sortBottom of the sort

Where the sort considers the "top" of the descending.


Top of the sortTop of the sort


Fixes? Suggestions? 


11 - Bolide

Hi @wmcclure ,

My guess is that since you're sorting on strings, the sort tool cannot recognize that January 2020 is after December 2019. It will only sort the numbers as they are presented without factoring in any date specific logic. What you could do is parse out the date from your string, then sort on that. You could either use text to columns and delimit on the underscore, or use RegEx to parse that out.

8 - Asteroid

Thanks for the clarification. Love the learning as I go. It refines my workflows and I get better at it everyday. 


I worked this out while waiting for a, wonderfully prompt, response from this community.



I use this to create the new column, parse it as a date/time, sort by descending, and then select only the child url. Back to the rest of my workflow with the data ordered properly and selecting the correct record.