Forum Discussion

Kreg's avatar
Kreg
Icon for Helper I rankHelper I
3 years ago
Solved

Query does not work as expected

Hi,   I have a query which works partially: Model Type =  IF (LEFT(model[type], 8) = "https://" ||  OR(     ISNUMBER(model[type])     ,0     ),     "Accepted","Failed")   Now, you can ...
  • rsbin's avatar
    rsbin
    3 years ago

    Kreg ,

    Here is a slight modification:

     

     

    Accepted/Failed = SWITCH(
                          TRUE(),
                          LEFT( [Type],8 )   = "https://", "Accepted",
                          LEFT( [Type], 1 ) IN {"1","2","3","4","5","6","7","8","9","0"}, "Accepted",
                          "Failed" )

     

     

    Type                                       Accepted/Failed

    https://tesla.com/345345 Accepted
    345345 Accepted
    - Failed
    Not Applicable Failed

    The limitation with this code is that it assumes if the first character is a digit, then the entire value is numeric.  If your entries will consist of both numbers and letters, then further adjustments will have to be made.

    Regards,