Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Custom message in invalid value error

Hi friends,

     In my app ,I have a form named Checklist with a column named:"Matricule Camion" with type enum. I have this formula in the valid if column:

ISBLANK(
FILTER(
"CheckList",
AND(
[Matricule Camion] = [_THISROW].[Matricule Camion],
IN([Action], {"Bloqué", "Maintenance programmée"})
)
))

I want to display two different messages in invalid value error:

  1. When [Action]="Bloqué"  ,message would be:"The truck is blocked"
  2. When [Action]="Maintenance programmée" ,message would be :"Truck is planned for maintenance"

How to achieve this functionality?

Best regards,

 

Solved Solved
0 9 322
1 ACCEPTED SOLUTION

Here is my alternative:

1. 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",
  ""
)

 2. 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.

View solution in original post

9 REPLIES 9
Top Labels in this Space