cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Report Computed Fields: Challenge #2

AnitaD
4-Participant

Report Computed Fields: Challenge #2

Another multiple condition flag question: I’d like to flag an item with 1 if it meets two or more conditions (based on different fields). Example:

HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 14 AND GetYear(“Created Date”) == GetYear(Now())

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Anita,

You should be able to do this with the ? operator, you may just need some more parentheses.

(as a word of warning, I tend to add more parentheses than may be necessary to avoid any order of operation confusion).

( (HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 14)

and (GetYear(“Created Date”) == GetYear(Now())) ) ? 1 : 0

Hope that helps,

Matt

View solution in original post

2 REPLIES 2

Hi Anita,

You should be able to do this with the ? operator, you may just need some more parentheses.

(as a word of warning, I tend to add more parentheses than may be necessary to avoid any order of operation confusion).

( (HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 14)

and (GetYear(“Created Date”) == GetYear(Now())) ) ? 1 : 0

Hope that helps,

Matt

AnitaD
4-Participant
(To:matt_giltaji)

thanks for this one, too, Matt. really appreciate it.

Top Tags