Format Rule Expression help

Hello,

This app has a table called pre start in which machines are inspected.
Another table called Risk assessment in which machines are inspected.
Obviously these tables cover different aspects to inspect.

I am trying to format the risk assessment UX.
I have this:
3X_8_b_8b5f75c4907c63b2f1702ce1409ad2a49bb364d8.png

Tick means it passed the risk assessment
Cross means it failed
Exclamation mark means the machine has moved location since last assessed and requires a new assessment.

Both tables referred to above use Timestamp as the key column, Equipment to identify the equipment and Site to refer to the location.

My issue arises with the exclamation mark expression.
It should be asking:
Risk assessment [Site] = Pre Start[Site]

The expression I have so far:

[Site] =
LOOKUP(MAX(SELECT(
Pre Start[Timestamp],
([_THISROW].[Equipment] = [Equipment]))),
โ€œPre Startโ€,
โ€œTimestampโ€,
โ€œSiteโ€)

This results in the image above.
This is incorrect as it should look like this:
!W1
W26
!W28
W29
W43

Solved Solved
0 17 260
1 ACCEPTED SOLUTION

I have found the cause of the issue!

For anyone interested in this in the future.
My test data had three timestamps with the same values.
Timestamp was the key in this data.

This resulted in odd behaviour with selecting a row in a table, deck or form view. Selecting some rows would produce a different row in detail view.
This also caused format rules to act completely unexpectedly.

For the Appsheet team, for some reason appsheet did not inform me of the duplicate key values until I changed the view type to form.

View solution in original post

17 REPLIES 17
Top Labels in this Space