Entry Block

I want that if _R is written in the last, then there will be no entry.

AWB NO

QR1000122554_R

QR1000129253_R

 

0 11 155
11 REPLIES 11

Use the right() function to check the last characters. RIGHT() | AppSheet Help Center 

What cannot be done with the ENDSWITH() function.

RIGHT(
[AWB NO],
LEN([AWB NO]) - FIND("_R",[AWB NO])+1
)

 

RIGHT(
....The value of column 'AWB NO'
....((The text length of (The value of column 'AWB NO') - FIND(
........"_R"
........The value of column 'AWB NO') + 1)

 

ERROR SHOW

Capture.PNG

Do it with:

ENDSWITH([_THIS], "_R")

Go with ENDSWITH() as @SkrOYC suggested, that will be easier. If you use RIGHT() you would use an expression like this

not(right([AWB NO], 2) = "_R")

Hi @graham_howe can you explain me why not working this function.

 

AND(AND(AND
(ISBLANK(
  FILTER(
    "CAMPUS SCAN SHEET",
    ([_THIS] = [AWB NO])
  )
  - LIST([_THISROW])
),

LEN([AWB NO]) > 6),
NOT(RIGHT([AWB NO],2)="R")),

NOT(
  OR(
    CONTAINS([_This], "CRP"),
    CONTAINS([_This], "~"),
    CONTAINS([_This], "&"),
    CONTAINS([_This], "_"),
    CONTAINS([_This], "/")
  )))

Note: This expression could impact performance.

ALL these statements are true:
....1: ALL these statements are true:
........1: ALL these statements are true:
............1: ((The list of values of column 'GATE ENTRY NO'
................from rows of table 'CAMPUS SCAN SHEET'
................where this condition is true: ((The value of column 'AWB NO') is equal to (The value of column 'AWB NO')) - LIST(
................The value of column 'GATE ENTRY NO')) is empty
............2: (The text length of (The value of column 'AWB NO')) is greater than (6)
........2: This statement is false:
............(RIGHT(
................The value of column 'AWB NO'
................2)) is equal to ("R")
....2: This statement is false:
........ANY of these statements is true:
............1: (The value of column 'AWB NO') contains the text value ("CRP")
............2: (The value of column 'AWB NO') contains the text value ("~")
............3: (The value of column 'AWB NO') contains the text value ("&")
............4: (The value of column 'AWB NO') contains the text value ("_")
............5: (The value of column 'AWB NO') contains the text value ("/")

 

Maybe you forgot the "_" on "_R".

Also, there is a NOT() that could be replace with <>:

 

AND(
  AND(
    AND(
      ISBLANK(
        FILTER(
          "CAMPUS SCAN SHEET",
          ([_THIS] = [AWB NO])
        )
        - LIST([_THISROW])
      ),
      LEN([AWB NO]) > 6
    ),
    RIGHT([AWB NO], 2)<>"_R"
  ),
  NOT(
    OR(
      CONTAINS([_This], "CRP"),
      CONTAINS([_This], "~"),
      CONTAINS([_This], "&"),
      CONTAINS([_This], "_"),
      CONTAINS([_This], "/")
    )
  )
)

Also, you don't need to nest AND() expressions.

You could:

 

AND(
  ISBLANK(
    FILTER(
      "CAMPUS SCAN SHEET",
      ([_THIS] = [AWB NO])
    )
    - LIST([_THISROW])
  ),
  LEN([AWB NO]) > 6,
  RIGHT([AWB NO], 2)<>"_R",
  NOT(
    OR(
      CONTAINS([_This], "CRP"),
      CONTAINS([_This], "~"),
      CONTAINS([_This], "&"),
      CONTAINS([_This], "_"),
      CONTAINS([_This], "/")
    )
  )
)

PS: I have no idea if your expression does what you need, but the syntax seems right

 

 

RIGHT([AWB NO], 2)<>"_R"

Only this function is not working. 

So if you have nothing but that in the expression it is not working? That seems hard to believe. Are you sure there is nothing else conflicting with it? For example, what field is the following condition applying to?

CONTAINS([_This], "_"),

If R comes in the last error appears.

Top Labels in this Space