MichaelTamoush
5 years agoQrew Captain
IF then syntax Question
I know this is simple, but for some reason I can't get the syntax.
Example Code:
If(
[Field A] = true and ([Field B] = "Example1" or [Field C] = "Example2"), "Result A",
[Field A] = true and ([Field D] = "Example3" or [Field E] = "Example4"), "Result B",
[Field A] = true and ([Field F] = "Example4" or [Field G] = "Example5), "Result C")
I suspect there is an easy way to only write the [Field A] = true once, instead of 3 times, but I just can't seem to get it. The above code works, but I think it would be cleaner to not repeat that condition, especially if this ran for 10 lines or something. Thinking just a simple nested if statement, that I keep writing wrong?
------------------------------
Mike Tamoush
------------------------------
Example Code:
If(
[Field A] = true and ([Field B] = "Example1" or [Field C] = "Example2"), "Result A",
[Field A] = true and ([Field D] = "Example3" or [Field E] = "Example4"), "Result B",
[Field A] = true and ([Field F] = "Example4" or [Field G] = "Example5), "Result C")
I suspect there is an easy way to only write the [Field A] = true once, instead of 3 times, but I just can't seem to get it. The above code works, but I think it would be cleaner to not repeat that condition, especially if this ran for 10 lines or something. Thinking just a simple nested if statement, that I keep writing wrong?
------------------------------
Mike Tamoush
------------------------------