Sep 28, 2020 03:42 AM
Hello everyone,
I would like to have a formula column in a table where I have a code name as the first column today. This formula should check the code and give me a determinated result.
Today my codes are SFPAPXXXXRI004, or SFPAPXXXXBA005. I would like a column that says “Ring” if there is an “RI” on the code or “Bracelet” when there is a “BA” and so on.
Is this possible.
Many thanks for your help!
Solved! Go to Solution.
Sep 28, 2020 04:21 AM
If you already have the unique codes in the table, then you can perform a SEARCH() in a formula and return results only if the search phrase is found in the string by using IF statements.
Assuming a field name of {Code ID}, I would create a new Formula Field to display the product type, with a formula of:
IF(SEARCH(“RI”, {Code ID}), “Ring”, IF(SEARCH(“BA”, {Code ID}),“Bracelet”))
This should output “Ring” or “Bracelet” only if it finds an “RI” or “BA” within the string it’s searching. You could add additional rules by using nested IF statements. Keep in mind the search is case sensitive.
Hope that helps.
Sep 28, 2020 04:21 AM
If you already have the unique codes in the table, then you can perform a SEARCH() in a formula and return results only if the search phrase is found in the string by using IF statements.
Assuming a field name of {Code ID}, I would create a new Formula Field to display the product type, with a formula of:
IF(SEARCH(“RI”, {Code ID}), “Ring”, IF(SEARCH(“BA”, {Code ID}),“Bracelet”))
This should output “Ring” or “Bracelet” only if it finds an “RI” or “BA” within the string it’s searching. You could add additional rules by using nested IF statements. Keep in mind the search is case sensitive.
Hope that helps.
Sep 28, 2020 04:44 AM
Works PERFECT, thank you very much!