Working in Sharepoint 2010, I have to create a Sharepoint Designer Workflow to query all the items in a list. I want to query the list and sort the results from highest to lowest based on project ID. From this I want to be able to find the highest value for project ID among all the items in the list (basically which item is the most recently created) and store that in a variable. I will use this variable to increment the value so I can set the project ID of the next item and so on. Additionally I cannot use the OOTB ID field which is why I am attempting to create an equivalent via workflow.
Unfortunately from my initial research it doesn't appear SPD has an action to query a list. Is there an option that I am missing or is there a different way to be able to achieve this OOTB?