How to use If-Else action?

conditions

#1

As a newbie I’m exploring the functions of RPA Express.

I want to incorporate the If-Else action in my script. But how can I make a comparison work to either follow the Then- or the Else-path of the process? I tried to compare numbers (of which 1 must be copied from an Excel-sheet), but I can’t find a variable to do this (“string” doesn’t recognise numbers and the default value of the “numbers” variable can’t be overwritten).

Can anybody help me with learing how to use this action? Or help me where I can find information? The information in het Knowledge Base wasn’t sufficient.


#2

@Peter_van_Rooij2 - This topic is very similar to previous one you’ve created - Override “number” variable with clipboard value
Please let us know you are still looking for something different.


#3

It’s partly true. I learned from the previous one that it isn’t possible to overrule the default value in the numbers-variable. But I don’t understand how to use the If-Else action then. That’s what this topic covers for me.


#4

Hi Peter,

Good questions. We will try to put together an example script and share with you here.


#5

You can compare boolean values, strings, numbers in the If-Else conditions, but you cannot convert variable types yet.

See this example from our sample scripts (HelloWorld):


#6

Thank you for the example.

I see you have an “item” variable, but this isn’t in the list of recorder variables. How did you create this?


#7

@peter - see the https://kb.workfusion.com/display/RPAe/Loops#Loops-ForEach topic

Item is a temporary variable that contains the current list or table item on each iteration.