Action Failed when Bloquer is selected

Hi,

I have an action to block a truck in my table form ,but when I click on it it displays :

Action Faild with the message restricting adding truck when that truck is already blocked.

eldderri_0-1721039840671.png

My column in checklist ,where I want to prevent duplicate truck checklist is set like that :

eldderri_1-1721039966895.png

My action to block the truck is set like that:

eldderri_2-1721040024256.png

I think the problem may be with this expression :

IF(
AND(
IN([_THIS], Select(Camions[Matricule Camion], true)),
ISNOTBLANK(
FILTER(
Checklist,
AND(
[Matricule Camion] = [_THIS],
[Action] = "Bloquรฉ"
)
)
)
),
FALSE,
TRUE
)

Best regards,

0 4 88
4 REPLIES 4

Hey @eldderri,
I think the message inside the "Action Failed" pop-up is the one you specified in one of your columns' data validity section, which means that you are trying to update this column and the condition for its validity isn't met. Am I right?

Zrzut ekranu 2024-07-17 o 13.41.41.png

Try to factorize your formula and check which condition returns FALSE.
What about this part: 

[Matricule Camion] = [_THIS]

Good luck ๐Ÿ˜‰

When I used your formula as follows:

eldderri_1-1721555883750.png

 

I got this error:

eldderri_0-1721555762439.png

 

I didn't mean to use this in your custom error formula. I was making sure that I understood the problem correctly. But thanks to this we know that this condition is met: [Matricule Camion] = [_THIS].

 I thought you would check all of your conditions in your IF() formula to find out which causes the problem. Did you try to factorize your snippet?

I have changed my valid if formula to:

ISNOTBLANK(
FILTER(
"CheckList",
AND(
[Matricule Camion] = [_THIS],
[Action] = "Bloquรฉ"
)
)
)

And add a virtual column named Status message withe the following formula:IF(
ISNOTBLANK(
FILTER(
"CheckList",
AND(
[Matricule Camion] = [_THISROW].[Matricule Camion],
[Action] = "Bloquรฉ"
)
)
),
"Ce camion est en รฉtat de blocage",
""
)

And still not working

Top Labels in this Space