When a workflow runs, anything that is done server-side runs before anything that is done client-side. This means that if your "result of a previous step" action is in a server-side action, but the previous step runs client-side, the server-side action may run before the client-side action is completed. As s result, there is no data there yet.
The way to workaround this behavior and ensure the steps happen in the order that you want (with the data filled) would be to separate the workflow into two, scheduling a custom event that does the server-side step after the client-side action has been executed.