Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ignore selection from two fields in an if statement

Hi,

I have an if statement that I use to change the background colour of an expression in a table.

The expression is as simple as

if(monthstart(StartDate) <= monthstart(today()) or StartDate < 30, red())

The expression works as expected, but I would like the expression to ignore a selection from two specific fields in my app as when a user makes selections on those fields, the colour expression doesn't work as expected.

Can someone please let me know if it is possible to exclude selections in an if statement and how to do it if possible?

Many thanks

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Possibly this:

if(monthstart(Only({<Field1=, Field2=>} StartDate)) <= monthstart(today()) or Only({<Field1=, Field2=>} StartDate) < 30, red())

(change Field1, Field2 to the correct fieldnames)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Possibly this:

if(monthstart(Only({<Field1=, Field2=>} StartDate)) <= monthstart(today()) or Only({<Field1=, Field2=>} StartDate) < 30, red())

(change Field1, Field2 to the correct fieldnames)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Fantastic Jonathan.

Many thanks