You put a file or folder path in the Action's text box -- the Action will then reveal that item. To reveal a random item you'll need to make a list of all the files in "Test" and then pick one.
The KM "native" way would be to "For Each" the contents of "Test" to build your list:
I've assumed your "SSD 1" is actually a mounted volume, not a folder called "SSD 1" in your home folder (which is what ~/SSD 1 would mean).
Using only KM "native" Actions and Tokens makes it easy for you to see what's happening -- take a look on the Wiki, or ask here if you've questions. The disadvantage is that it will be slower than a shell script if you've got hundreds of files to pick from, so if it's too slow for you then we'll do a shell version based on @griffman's ls | shuf or similar.
SSD 1 is a folder on my MacBook not a mounted volume. Please advise…. I really like that you have attached the *.kmmacros, it makes it so much easier for us old novices
My bad -- my assumption made an ass of me (again!).
Just change the path in the first action from
/Volumes/SSD 1/Test
to
~/SSD 1/Test
...as you originally posted.
Top tip -- if you click on the folder icon to the right of the field you'll get a normal OS "Open" dialog which will allow you to choose a folder, no typing required.
If that's the objective, you're back to the original problem: macOS Finder doesn't offer a way to arbitrarily reorder the file list. You must sort by one of the fields in my original screenshot; there is no "magic code" to move an arbitrary file to the top of the list.
If you absolutely want the selected file at the top of a list of files, then you will have to either rename it, or change the tags on the files and sort by tags, as my macro did. There is no other way to arbitrarily rearrange the filenames in Finder (short of viewing by icon and manually dragging them around).
In theory, you could also do it by changing the modification time on the file, then sorting the directory by date modified, but it seems really odd to modify a file's timestamp just to control its sort order.
If you make the target window small, with only 5 files showing, it will automatically scroll so that the selected item is in view. Spotting the only highlighted item out of 5 isn't that much harder than spotting the top item!
As @griffman says, to force something to the top you'll need to set something that Finder sorts by. Perhaps the least disruptive is "Comments" -- you'll need to show that column and sort in reverse order, then set your random file's Comment to the current time in seconds: