1

Given the following table:

|   A  |     B      | holdingtemp1 | holdingTemp2 | holdingtemp3 | holdingTemp4 |  idx |
| Grits| 7:06:24 AM | 180.199      |      -       |      -       |      -       |   0  |
|      | 8:35:56 AM |      -       | 174.30       |      -       |      -       |   1  | 
|      | 9:25:18 AM |      -       |      -       |      182     |      -       |   2  |
|      | 10:02:0 AM |      -       |      -       |      -       |      180     |   3  | 

How to properly index column B to perform field comparisons in order to implement conditional logic where each temperature recording must be taken within a two hour interval relative to the previous recording, such that:

if(B[0] + 2 > B[1], green(), red()) // 9:06 > 8:35, turns cell green
if(B[1] + 2 > B[2], green(), red()) // 10:35 > 9:25, turns cell green

Edit:

Found the right function to use for this implementation, but peak() is returning 4:43:21 AM for all records with

Peek('B', 0) as peekB, // 4:43:21 AM

and 5:11:03 AM with Peek('B', 1) as peekB, // 5:11:03 AM

If so, does peek() fetch the field value of the preloaded or postloaded data?

ericdwkim
  • 37
  • 5
  • the second argument in `peek` (0 in your case) is optional. With the second argument `peek` will return the value of the row specified. If you just want the value for the row above then use it without the second argument `Peek('B') as peekB` – Stefan Stoichev May 24 '22 at 02:11

0 Answers0