Project data & BIM
About BIM-based management of attributes, schedules, templates, favorites, hotlinks, projects in general, quality assurance, etc.
SOLVED!

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

kjell syryn
Booster

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 ACCEPTED SOLUTION

Accepted Solutions
Solution
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

View solution in original post

5 REPLIES 5
Solution
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

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

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

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

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