Hello,
I am trying to achieve some default gallery images if the user has not uploaded their own custom image. This function achieves the default image part.
If(
ThisItem.'Service Type' = "PDF",
'adobe-pdf-icon-logo-png-transparent',
If(
ThisItem.'Service Type' = "SQL",
'3404108-200',
If(
ThisItem.'Service Type' = "Excel",
'61045dfc9cd69c000418c11a',
If(
ThisItem.'Service Type' = "Power Bi Report",
'Power-BI-Logo-Transparent',
If(
ThisItem.'Service Type' = "Crystal Report",
'sap-crtsyal-350x296',
If(
ThisItem.'Service Type' = "Word",
'word-file-icon-8',
""
)
)
)
)
)
)
However when I add this first isblank/substitute part to accommodate the user custom images being prioritized, the function does not replace the default icons, but does not error out either. Am I missing something? Is there a better way of doing this than nested IF statements?
If(
!IsBlank(ThisItem.Image),
Substitute(
ThisItem.Image,
"""",
""
),
If(
ThisItem.'Service Type' = "PDF",
'adobe-pdf-icon-logo-png-transparent',
If(
ThisItem.'Service Type' = "SQL",
'3404108-200',
If(
ThisItem.'Service Type' = "Excel",
'61045dfc9cd69c000418c11a',
If(
ThisItem.'Service Type' = "Power Bi Report",
'Power-BI-Logo-Transparent',
If(
ThisItem.'Service Type' = "Crystal Report",
'sap-crtsyal-350x296',
If(
ThisItem.'Service Type' = "Word",
'word-file-icon-8',
""
)
)
)
)
)
)
)