Pass a string to a workflow (or function), modify it and return modified string

Still struggling with passing arguments/variables to a workflow or function and returning them.

I have a small bit of code that I want to use to format a string (I am grabbing a value from a web screen, and sometimes there spaces are not spaces, if you know what I mean, and I need to make sure to modify those spaces so they will be the same as a string I am going to compare the variable to).

The code is not abnormally complex. I have a workflow that I have written. I simply want to pass a variable that I have retrieved from the web screen, say strMessageValue, and have the workflow modify. This should be very simple. But I have to make in and out arguments and and go through a variable shuffle to do this. I am sure I am missing something.

Please help.

Example workflow

  1. my initial text = “A B C”, its stored in a variable called text

  2. next, i pass this text variable as an argument into my “Modify Text” workflow

Here is my modify text workflow - it uses one in/out argument, this means that this argument is both the input and output
it will take the input, remove all spaces from it and return it as an output

  1. when i print my text variable again, it will have all spaces removed

Here are the two workflows, the main workflow is Extract text from website.xaml
Extract text from website.xaml (5.8 KB) Modify Text.xaml (5.1 KB)