Arguments Returning As Null

Hello all,

I’m working on automating an IT ticket system, and am having trouble with passing arguments. I’ve done this multiple times, but now the arguments after this invoked workflow are returning as null, giving a null reference error when I enter the for each loop. When I debugged, the String array was set to the default value until after the Invoke Workflow activity, after which it was null.
That is the workflow file I am attempting to pass the argument (a string array) to.

In the invoked workflow. I am certain that the selector is obtaining the proper value, as I debugged and used message boxes to check my work. I’ve tried everything I can think of, renaming the variable, setting a default value, all to no avail. I am wondering if there are any solutions.

You are passing the value of POItoSearch value from Main workflow to GetPOIDetails workflow right?

then the argument direction should be IN @mkdatz

That is one issue I found now. Correct me if I’m wrong :slight_smile:

GetPOIDetails gets the POI (point of interest) from our ticketing website and passes it to the main workflow, where it overwrites the POItoSearch variable in main and prints it out. So it would still be an out argument, correct?

yeah got it @mkdatz

Try this once :

  1. remove the initialized value in the main workflow
  2. Check whether the values are retrieved by placing a write line or message box inside the child workflow and
  3. Use assign variable to assign the argument with the values you are getting I mean the entire string array

Still no luck, removed the default value in the main workflow and no change.

Checked the values in the child workflow and got the correct answer.

Not sure what you mean about the variable assignment, however. I thought that’s what the argument panel was for.

You have to assign the variable you store the values inside the child workflow to the argument you declared. Then it will send the value through arguments @mkdatz

I hope you are trying to assigning the value to arguments directly

1 Like

Ah okay, I understand what you mean. I actually double checked this and found I did not do this originally- changed that to what you said and it worked fine. Thanks for your help!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.