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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Report Computed Fields: Challenge #1

AnitaD
8-Gravel

Report Computed Fields: Challenge #1

The following report field computation flags an item with a 1 if its State on a specific date/time was 10 (i.e. Closed):

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

However, I’d like to flag with a 1 if the historical State was 10 (Closed) or 41 (Canceled). I've made several attempts to no avail. Can you assist please?

ACCEPTED SOLUTION

Accepted Solutions

Hi Anita,

I don't have much experience with the HistoricFieldValue() itself, but I do enjoy computed fields .

From how I see it, there are 2 ways to get the functionality you mentioned..

The more straightforward way is to use parentheses to group the OR:

((HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 10) or (HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 41)) ? 1: 0

An alternate way is to use nested ? operators:

(HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 10) ? 1 : ((HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 41) ? 1 : 0 )

Hope that helps,

Matt

View solution in original post

2 REPLIES 2

Hi Anita,

I don't have much experience with the HistoricFieldValue() itself, but I do enjoy computed fields .

From how I see it, there are 2 ways to get the functionality you mentioned..

The more straightforward way is to use parentheses to group the OR:

((HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 10) or (HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 41)) ? 1: 0

An alternate way is to use nested ? operators:

(HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 10) ? 1 : ((HistoricFieldValue(State,timestamp("Apr 1, 2013 11:59:59 PM")) == 41) ? 1 : 0 )

Hope that helps,

Matt

thanks, Matt. I really appreciate your help.

Announcements


Top Tags