Check if all arguments are empty

Hi all,

I’m wondering if there is a simple command to check if all in- arguments are empty.

at the moment I just do
if-activity
in_RowNumber is nothing and in_dtTestTable is nothing

then I manually make those within the if statetment so I can test the workflow without running the entire project.
(a bit like mocking the items for test purpose…)

now is there an easy command to check if all arguments are empty OR even better if the workflow is invoked or running on its own?

kind regards,
Jo

hi @JoVansant
i guess if you want to delete you variable that is not used may be this might be help full to you

cheers:D

not exactly what I needed… :slight_smile:

I want to test my workflow (.xaml) without starting the entire project. So I can easely find bugs or just test if evrything is working. but to do so I need the arguments datatable, input strings, etc…

So currently I check if all my arguments are null or nothing and then I manually create a usefull/ workable dummy datatable and input strings…

and now the reason for this topic is there an easy command to see if ALL arguments are nothing (null).

kind regards,
Jo

hi @JoVansant

oh i see you want to run your workflow without running the whole project.
What i suggest if you only want to run specific workflow and it has a dependency in another workflow means that you need to pass the arguments just give a value for that variable to satisfy that specific workflow that you need to execute. is this make sense i hope i understand your problem?
or maybe you should come up more to elaborate your issue like projecting some pictures here or upload your xaml files…

cheers :smiley:

Happy learning :smiley:

Hi, @JoVansant - maybe this will help. It shows how to add arguments to a collection. From there, you can iterate through the collection, checking values.

Very usefull @sagacity, but he actually has a similar issue like I.

I will create an example of what I am doing.

ExampleArguments.zip (13.9 KB)

and I would like to improve the if condition so I do not need to specify each argument there 1 by 1
ofcourse this is only a very small example often there are +10 arguments.

@JoVansant That is exactly what the example can do. Once you have your collection of arguments, you iterate through them to check if they’re set or not. So, even if you have 20, each run time, it loops through and checks each argument for you.

But, if you mean that you create the argument

I looked at the example and the issue remains;
you still need to manually specify each argument manually.

listOfArgs ->
new list (of object) from {argument1,argument2,argument3}

but ofcourse it is possible there is no such command like this.
in php for example you get a collection of all send ‘arguments’ via ``` $_POST

thanks for helping anyway :slight_smile:

Did you ever figure this out? I also need a list, array, etc of the “in arguments” and don’t want to have to specify the names of the arguments. I understand exactly what you’re looking for and why, I’m very surprised there isn’t a seemingly simple answer.

sadly enough no solution as far as I know.
I have been out of practice with the latest developments of uipath so I’m not sure if there is a new function/activity to adress this issue.

Some sort of mocking would be very handy for running simple tests without having to run the entire project.