How to do a logical OR on text in an expression?

How to do a logical OR on text in an expression?

I have an entity that looks like:

Machine  MachineGroup Path URL Destination

Each row will have data in either the Machine or MachineGroup column, but not both.  When I open up an expression editor and enter the following, I get an error that there are "Incompatible data types in or operator ('Text', 'Text'):

Product_RedirectTable.List.Current.Machines.Name or Product_RedirectTable.List.Current.MachineGroups.Name

What am I doing wrong here?

Hi  Craig,

If i understood your problem, the two fields will not be filled at the same time, so you want to show Product_RedirectTable.List.current.Machines.Name if Product_RedirectTable.List.Current.MachineGroups.Name is empty,

You can do it adding an "if widget" to your screen to check if the Machines.Name is empty and instead of one, use two expressions:
one for the "Product_RedirectTable.List.Current.Machines.Name" and another for the "Product_RedirectTable.List.Current.MachineGroups.Name".

Like this you will show the Product_RedirectTable.List.Current.Machines.Name or Product_RedirectTable.List.Current.MachineGroups.Name according to the if condition.

Hope it helps,
Sérgio Oliveira
Sorry to be such a noob...  I set the IF statement to be:


It says:

'Boolean' data type required instead of text.

If I try:

It says: 'Boolean' data type required instead of 'Entity Reference (Text)'

Never mind...  I figured it out.  

Hey Craig,

There is no problem to ask, we are here to help each other.

Take a look at this example:

Sérgio Oliveira