Skip to main content
1-Visitor
April 12, 2013
Solved

Report Computed Fields: Challenge #2

  • April 12, 2013
  • 1 reply
  • 1246 views

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.

    Best answer by matt_giltaji

    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

    1 reply

    1-Visitor
    April 12, 2013

    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

    AnitaD1-VisitorAuthor
    1-Visitor
    April 15, 2013

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