Nesting CASE and IF

I'm trying to assign sales territories based on multiple criteria and am having problems...

Here is what I am trying to do:

1. If there Salesperson_Override field is populated use that person
2. If there is no Salesperson_Overide, look at Territory (can be East or West)
3. Assign to a salesperson based on the vertical

here is what i have that isn't working:

IF ([Salesperson_Overide]="",
   Case ([Territory]="West",
        Case ([Vertical]="Accessories", "Bob",
                                      "Appliances", "Jim",
                                      "Auto", "Jane",)
        Case ([Vertical]="Accessories", "Mary",
                                      "Appliances", "Tom",
                                      "Auto", "Sue",))
[Salesperson_Overide])

I have made many adjustments but can't seem to get past my syntax issues. Help please?

Thanks

Dan

 

        

    Cancel

     Also, you have commas at the end of your case statement with no "else" value.  This is how I would do the formula you have at the top:

    var Text $notOveride = If([Territory]="West",Case([Vertical]="Accessories", "Bob","Appliances", "Jim","Jane"),Case ([Vertical]="Accessories","Mary","Appliances","Tom","Sue"));

    If([Salesperson_Overide]="", $notOveride,[Salesperson_Overide])

    ------------

    Territory is only East or West, so if it is West, do the first case, if not, do the second case.

    With the case statement, I eliminated "Auto" and left "Jane" or "Tom" (depending on the territory) as the "else" result).

    I put these in a variable at the top so you have a clean If statement below.

      Cancel

       First thing I notice is the first part of your case statement is
      Case([field]="value",...

      and it should be
      Case([field],"value",...

      no equals sign

      From the Quickbase example:
      Case([Grade], "A", 100, "B", 90, null)

        Cancel

         THANK YOU SO MUCH THOSH!!!

        I had to remove the dollar sign in the variable definition line, but it worked like a charm.

          Cancel

           oops.  right!

            Cancel
            Contribute an answer

            People come to QuickBase Community for help and answers—we want to let them know that we're here to listen and share our knowledge. We do that with the style and format of our responses. Here are five guidelines:

            1. Keep it conversational. When answering questions, write like you speak. Imagine you're explaining something to a trusted friend, using simple, everyday language. Avoid jargon and technical terms when possible. When no other word will do, explain technical terms in plain English.
            2. Be clear and state the answer right up front. Ask yourself what specific information the person really needs and then provide it. Stick to the topic and avoid unnecessary details. Break information down into a numbered or bulleted list and highlight the most important details in bold.
            3. Be concise. Aim for no more than two short sentences in a paragraph, and try to keep paragraphs to two lines. A wall of text can look intimidating and many won't read it, so break it up. It's okay to link to other resources for more details, but avoid giving answers that contain little more than a link.
            4. Be a good listener. When people post very general questions, take a second to try to understand what they're really looking for. Then, provide a response that guides them to the best possible outcome.
            5. Be encouraging and positive. Look for ways to eliminate uncertainty by anticipating people's concerns. Make it apparent that we really like helping them achieve positive outcomes.
            Cancel