Error: Function error: function IF argument 2 and 3 need to have the same type

  • 24 January 2024
  • 2 replies

  • Newly Minted Pigmenteer
  • 1 reply


I’m having issues with a formula. My formula is currently looking like this:

The result I get is the error message Function error: function IF argument 2 and 3 need to have the same type. Any idea of what I need to do to get the dummy name in the CC# column?


Best answer by Issam Moalla 24 January 2024, 10:54

View original

2 replies

Userlevel 4
Badge +5

Hi @Petter ,

The error here is due to a data type mismatch: You need to have the 2nd argument and 3rd argument result into the same data type as your target property here CC #.

  • 2nd Argument:
    ‘Cost Center GL’.’CC Concatenated’ = ‘9999 Dummy CC”
    will result in a boolean output (True/False).
  • 3rd Argument:
    ‘GL test’.’CC (Load)’

    will result in attributing the same data type as the property CC (Load) which in your case is the Cost Center dimension.

Since your target property has a Cost Center dimension data type as well you would need to adjust the 2nd argument.
To achieve the logic you are looking to apply the 2nd argument could reference the item directly within the Cost Center dimension directly:

'Cost Center GL'.'CC Concatenated'."99999 Dummy CC"

This would result in the Cost Center dimension data type.

hope this helps,

I love easy fixes👌

Thanks, Issam!