Our online shopping is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

FlexLogger

cancel
Showing results for 
Search instead for 
Did you mean: 

if, then, else programming in FlexLogger

Solved!
Go to solution

Hello everyone,

 

I would like to realize an if, then, else programming in FlexLogger and I don't know how to implement it.
I want to display a pressure. If p<0.1Pa, then p=0.1Pa should be displayed, else(p>0.1Pa) p=p should be displayed.
Is this possible with an arithmetic formula? Or is there another way to implement this?
I would be very grateful for your help.

 

Best regards
zarlex

0 Kudos
Message 1 of 3
(927 Views)
Solution
Accepted by topic author zarlex

Hi zarlex,

 

Yes, the arithmetic formula channel supports the ternary operator which allows you to do it/else logic.  In your case, assuming the channel name is 'p', the formula would look like:

'p' < 0.1 ? 0.1 : 'p'

Or you could invert the logic and write it this way

 

'p' >= 0.1 ? 'p' : 0.1

Hope that helps!

Message 2 of 3
(894 Views)

Hi Devin,

 

Thank you very much. It works perfectly.

 

best regards

zarlex

0 Kudos
Message 3 of 3
(872 Views)