STARTSWITH+duplicata

Bom dia, tudo bem?

Galera alguém poderia me ajudar?, quero configurar a entrada no campo Tipo Apenas código que começa com "GAI, PU, ​​​​​​​​​​​​​​​TO," e quero também que não seja permitida entrada duplicada , caso o status seja pendente , porém, a expressão abaixo não está dando certo.

 

OR(STARTSWITH([GAI/TO/PGK], "GAI-"),
      STARTSWITH([GAI/TO/PGK],"TO"),
       STARTSWITH([GAI/TO/PGK],"PU"),
NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )
)

Solved Solved
0 3 135
3 ACCEPTED SOLUTIONS

You may want to add in which column you are using this valid_if. The sub expression part 

NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )

can then be reviewed.

          

Additionally, you may also want to add at least an AND() around two sub expressions, something like 

AND(

OR(STARTSWITH([GAI/TO/PGK], "GAI-"),
      STARTSWITH([GAI/TO/PGK],"TO"),
       STARTSWITH([GAI/TO/PGK],"PU"),
NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )
)

View solution in original post

Por qual motivo esse erro?

Nilton_0-1698331987596.png

 

View solution in original post

Maybe this?

AND(

OR(STARTSWITH([GAI/TO/PGK], "GAI-"),
      STARTSWITH([GAI/TO/PGK],"TO"),
       STARTSWITH([GAI/TO/PGK],"PU")

      ),
NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )
)

 

The above may be syntactically correct. But I believe you will need change in the subexpression  NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )

depending on which column you are using it.

 

View solution in original post

3 REPLIES 3

You may want to add in which column you are using this valid_if. The sub expression part 

NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )

can then be reviewed.

          

Additionally, you may also want to add at least an AND() around two sub expressions, something like 

AND(

OR(STARTSWITH([GAI/TO/PGK], "GAI-"),
      STARTSWITH([GAI/TO/PGK],"TO"),
       STARTSWITH([GAI/TO/PGK],"PU"),
NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )
)

Por qual motivo esse erro?

Nilton_0-1698331987596.png

 

Maybe this?

AND(

OR(STARTSWITH([GAI/TO/PGK], "GAI-"),
      STARTSWITH([GAI/TO/PGK],"TO"),
       STARTSWITH([GAI/TO/PGK],"PU")

      ),
NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )
)

 

The above may be syntactically correct. But I believe you will need change in the subexpression  NOT(
        IN([_THIS],select(Check-in[status],[ID]<>[_THISROW].[ID])) )

depending on which column you are using it.

 

Top Labels in this Space