Notion Answers

Help between Notion users


Register & Ask

It's free & easy

Get answers

Answers, votes & comments

Vote and select answers

Receive points, vote and give the solution

Question

2votes

Notion Formula help!

Hi Guys, I am trying to make the below table into a formula in Notion, what am I doing wrong? Currently it is saying " Too few arguments in function if "

if(or(empty(prop("Progressing?")), empty(prop("Sore?"))), "Please answer first: 'Did you progress last time?' and 'How sore is the Target Muscle?'", if(prop("Progressing?") == "0: You had to do 2 more reps than planned to hit target RIR", if(prop("Sore?") == "0: You did not get at all sore in the target muscles", "Add 1-3 sets", ""), if(prop("Progressing?") == "0: You had to do 2 more reps than planned to hit target RIR", if(prop("Sore?") == "1: You felt stiff and sore after exercise but it went away by the next session.", "Add 1-2 sets", "Do not add sets"), if(prop("Progressing?") == "1: You had to do 0-1 more reps than planned to hit target RIR", if(prop("Sore?") == "0: You did not get at all sore in the target muscles", "Add 0-2 sets", ""), if(prop("Progressing?") == "1: You had to do 0-1 more reps than planned to hit target RIR", if(prop("Sore?") == "1: You felt stiff and sore after exercise but it went away by the next session.", "Add 0-1 sets", "Do not add sets"), if(prop("Progressing?") == "2: You hit your target RIR before hitting target reps", if(prop("Sore?") == "0: You did not get at all sore in the target muscles", "Do not add sets", "Do not add sets"), if(prop("Progressing?") == "3: You could not match last week’s reps at any RIR", if(prop("Sore?") == "0: You did not get at all sore in the target muscles", "Recovery Session", "Recovery Session"))))))))

1 Answer

0vote

polle Points94140

It is exactly what Notion is telling you: Too few arguments in function if.

You have multiple if statements without argument in the Notion formula and that's why it fails.

if this == this, do this, otherwise do this

Those are the arguments for the if statement and if you nest them to have multiple ifs, you have to include all the arguments needed for each one of them, but you are skipping some of them.

Here is a simple nested if Notion formula example.

if(prop("Progressing?") == 10, "One", if(prop("Progressing?") == 20, "Two", if(prop("Progressing?") == 30, "Three", if(prop("Progressing?") == 40, "Four", if(prop("Progressing?") == 50, "Five", "None")))))

Explained it is if Progressing is equal to 10, show One, otherwise start this new if: if Progressing is equal to 20, show Two, otherwise start this new if: and so on until the last one that has the false argument None.

If you review your if statements and arguments, you are missing some of them and that is why you get the "Too few arguments in function if" error.

I suggest that you break your formula out and add ifs one by one, confirming it is working starting with the first one. If that works, add another one, and so on.

Hope that helps.

Please log in or register to answer this question.

...

Welcome to Notion Answers, where you can ask questions and receive answers from other members of the community.

Please share to grow the Notion Community!

Connect