Forum Discussion

AllanBerces's avatar
AllanBerces
Post Prodigy
2 years ago
Solved

Assigning Code base from No.

Hi good day, Can anyone help on caculated column to achieved the below sample. Base from the code number.     Output: Job No. ABSD234DFFGD ABBF135RTER ACFDG204NMBN ABS...
  • rajendraongole1's avatar
    2 years ago

    Hi AllanBerces -Use below calculated column with switch and search function combination.

     

    JobCategory =
    SWITCH(
        TRUE(),
        SEARCH("234", [jobNo], 1, 0) > 0, "Plumber",
        SEARCH("135", [jobNo], 1, 0) > 0, "Mason",
        SEARCH("204", [jobNo], 1, 0) > 0, "Electrician",
        SEARCH("232", [jobNo], 1, 0) > 0, "Helper",
        SEARCH("789", [jobNo], 1, 0) > 0, "Lead",
        SEARCH("890", [jobNo], 1, 0) > 0, "Painter",
        "Unknown"
    )

     

     

    It works please check

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!