I'm trying to concat multiple address fields into a single multiline string in the Dynamics 365 table field editor. I have created an "fx" field and used the following code to populate the field, but it fails with an error saying the If statement had an invalid number of arguments.
This is my code:
Concatenate(
If(!IsBlank(billto_name), billto_name & Char(10), ""),
If(!IsBlank(billto_contactname), billto_contactname & Char(10), ""),
If(!IsBlank(billto_line1), billto_line1 & Char(10), ""),
If(!IsBlank(billto_line2), billto_line2 & Char(10), ""),
If(!IsBlank(billto_postalcode) || !IsBlank(billto_city),
Concatenate(billto_postalcode, " ", billto_city) & Char(10), ""),
If(!IsBlank(billto_stateorprovince), billto_stateorprovince & Char(10), ""),
If(!IsBlank(billto_country), billto_country, "")
)
I've tried different variations of the above, but all end up with the same error. Is there a simple thing I'm missing here or is the fx formular limited?