cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
kjell syryn
Booster

Error: the number of arguments is not correct for this function

When creating a Expression with 2 IFS i get the error "the number of arguments is not correct for this function". What dose this mean and how can i solve this

1 Solution

Accepted Solutions
Barry Kelly
Moderator

Make sure it is following the correct format.

 

IFS(argument_1, result_1, argument_2, result_2, argument_3, result_3)

 

You can add as many arguments/results as you want.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Go to post

5 Replies 5
Barry Kelly
Moderator

Make sure it is following the correct format.

 

IFS(argument_1, result_1, argument_2, result_2, argument_3, result_3)

 

You can add as many arguments/results as you want.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Jimmzs
Participant

Hi, I'm getting the same error and I think the syntaxis is ok. Can you help me with this?

 

Jim

 

Screenshot 2024-03-20 at 13.51.31.png

Barry Kelly
Moderator

What happens when you remove the last ... ,0

It is not part of the argument.

 

BarryKelly_0-1710985621419.png

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Xandros
Advisor

As additional information:

if you like to add a result (0 in your expression), if none of the other conditions are met, you can do it by adding a TRUE as last argument:

 

IFS ( TRANSECTO = "T3", 3, TRANSECTO = "T4", 4, TRANSECTO = "T5", 5, TRUE, 0 )

 

ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti
Jimmzs
Participant

Thank you so much. Indeed I wanted the "0" as the result if any of the conditions were true. 

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!