I am trying to figure out what order a list of strings appear in a text document. I am reading the text document and storing it in a String variable, “strText”.
For example strText = “Kaila, Kaitlyn, Storm, Daniel, Soul”
I also have a List variable, “listNames”
For example listNames= {“Storm”, “Kaitlyn”, “Daniel”, “Kaila”, “Soul”}
I am using a For Each loop on listNames to assign an Int32 variable called ‘charIndex’ to get the starting index of each name in the list, and then adding the item from listNames and the charIndex to a dictionary variable <String,Int32>, called “nameIndexes”.
I now need to sort the dictionary by the values (int32) asending, but I’m not sure how to do that. I am trying to do nameIndexes.Keys.OrderBy() but I don’t know what the parameters of OrderBy should be, I have looked at this microsoft doc but I’m having trouble figuring out exactly what i need to put for the values of the parameters: Enumerable.OrderBy Method (System.Linq) | Microsoft Learn
Any help is greatly appreciated
Thank you!
Here is a workflow example of what I have so far: test.xaml (7.8 KB)