I have done all the steps but the virtual column message is not displayed,because I think when a virtual column is primarily has no value it does not show.And in this case this column shall never be populted until Action is filled which is not what I am aiming to.What I want is to display a message as soon as the Matricule Camion value is found in my chechkist database and has either Bloqué or Maintenance programmé in Action column to avoid making duplicate checklist to the same truck.
Add a column named (e.g.) Statut matricule camion of type Text with Show? off and the following App formula expression:
SWITCH(
ANY(
INTERSECT(
{"Bloqué", "Maintenance programmée"},
SELECT(
CheckList[Action],
AND(
([_THISROW].[Matricule Camion] = [Matricule Camion]),
IN([Action], {"Bloqué", "Maintenance programmée"})
)
)
)
),
"Bloqué",
"The truck is blocked",
"Maintenance programmée",
"Truck is planned for maintenance",
""
)
For the existing Matricule Camion column, replace the existing Valid if expression with this:
ISBLANK([Statut matricule camion])
And set the Invalid value error expression to this:
[Statut matricule camion]
The App formula of the Statut matricule camion column determines whether the truck has a concern and describes the concern if any. The Valid if of the Matricule Camion uses the absence of a concern in Statut matricule camion to mean Matricule Camion is valid. If it isn’t valid, the concern noted in Statut matricule camion is displayed as the error message.