Cannot compare list to datetime

HI I am trying to add an expression to a format rule in order change the font color according to recent data updates using timestamp / datetime column from a different table, the result being the font of the main column value is a different color if there have been updates in the last 2 days. I keep getting a “cannot compare list to datetime” - I tried a virtual table but no dice. Any ideas would be helpful!

TABLE2[Timestamp] >= (NOW() +2)

0 6 908
6 REPLIES 6

Steve
Platinum 4
Platinum 4

The Timestamp column of which row in TABLE2 should the expression be using?

Hey Steve -
Should use the “Event” row (which is also the key for TABLE2)

Thanks

I know virtually nothing about your app or how your data is structured. What is “the ‘Event’ row”?

Basically if a new comment is left on a particular “event” from TABLE1 within the last 2 days, the font color of the “event” value will be different. In TABLE2 there is a different "event’ row which references TABLE1. Comments are left per event with a timestamp in TABLE2 - so when viewing TABLE1 “events” with new comments will be a different color - so TABLE2[Timestamp] >= (NOW() +2)
Do I need to do a SELECT([event] = [_THISROW] expression as well?

Thanks much!

My interpretation of your situation is this:

  • TABLE1 contains the events. This is a “parent” table.

  • TABLE2 contains comments about events in TABLE1. This is a “child” table.

  • When an event (described by a row in TABLE1) has comments (in TABLE2) with a timestamp within the last two days, the event should be highlighted (“the font color … will be different”) when displayed.

Try:

ISNOTBLANK(
  SELECT(
    [Related TABLE2s][_ROWNUMBER],
    ([Timestamp] > (TODAY() - 2))
  )
)

That’s it. Super. I need to look into the ISNOTBLANK expression.

Thanks thanks!

Top Labels in this Space