How to put two condition in While loop?

Hi All,

I’m new to WorkFusion. Can anyone tell me how to put two conditions in a While loop?

example: empty and ${counter}<5


Hi @Paranthaman

You can put one condition inside another one, like on the screenshot

Also, you can use custom script to use multiple conditions -

1 Like


Thanks for Reply

i want in while loop … is there any possible in while loop


The Custom script allowed or c#?

Yes, you can use it with a While loop.

Here is an example of such script.
If either of the conditions inside the custom script becomes false, the variable ${condition1} will become false, and the loop will stop.

In a custom action, you can use Groovy or Java.

    input = ['test_var'],
    output = 'condition1'
def customScript() {
if (
	(!(test_var).isEmpty()) && // 1st condition AND
	((test_var) != (RString.of("0"))) // 2nd condition
	){	{ 
       def condition1 = RBoolean.of(true)
     } else{
       def condition1 = RBoolean.of(false)
1 Like