Help

Re: View Condition in Formula

868 0
cancel
Showing results for 
Search instead for 
Did you mean: 
YourFriend
6 - Interface Innovator
6 - Interface Innovator

I have a view with the condition group:

When Primary Introducer Contains John Stamos
or Secondary Introducer Contains John Stamos
or Tertiary Introducer Contains John Stamos

Then I have an IF statement determining whether John Stamos is the Primary, Secondary or Tertiary introducer on an order and doing the calculation depending on which tier of introducer John Stamos is.

If Statement:
IF({Fees for Primary Consultant}="John Stamos", {Primary Introducer Cash Fee ⚙}, IF({Fees For Secondary Consultant}="John Stamost", {Secondary Introducer Cash Fee ⚙}, IF({Fees for Tertiary Consultants}="John Stamos",{Tertiary Introducer Cash Fee ⚙},0)))

Is there a way to make where the if statement says “John Stamos” instead refer to the view condition so I don’t need to manually edit the if statement each time I change the consultant?

Thank you

Best Wishes
Your Friend

2 Replies 2

Hi @YourFriend,

Nice case!

I recommend you to create a new single select field where you will input the name of consultants you have.
Then you can create a new formula field that will check the name and depending on the value it will return the result you want. the most efficient formula for this job is SWITCH() and you can use it like this:

switch({consultant_name},"John Stamos", "value if the name is John Stamos", "Maria Tade", "value if the name is Maria Tade")

Does it work for you?

Thanks
Dimitris Goudis

Wow, Thank you Dimitris for the quick response.

I am not sure if Switch is the ideal solution for me here but the single select field with consultant names worked wonders!

Now I just set the view and then select which consultant is invoicing and drag it across all records instead of manually changing the if statement.

I appreciate your wisdom!

By chance could do you have any light to shed on this case I’ve come across as well?

Thanks again!