Skip to main content
Solved

#ERROR! on very simple SUBSTITUTE

  • February 24, 2022
  • 3 replies
  • 59 views

Forum|alt.badge.img+16

Hi,

I am getting an Error back on the very basic SUBSTITUTE, which I have used numerous times in other tables of my base.

SUBSTITUTE({Record Name}," “,”-")

{Record Name} is a FORMULA FIELD that pulls the text from a LOOKUP FIELD (in the same table) that pulls the text from a FORMULA FIELD in another table.

Any ideas? Thanks in advance.

Tobias

Best answer by kuovonne

Lookup fields are the trickiest to use in formula fields. This is because they often (but not always) return arrays, not simple text strings or numbers.

Try these versions that convert the array to a string by using & ""

SUBSTITUTE({Record Name} & ""," ","-")
LOWER({Record Name} & "")

3 replies

Forum|alt.badge.img+16
  • Author
  • Known Participant
  • February 24, 2022

UPDATE:

This formula also produces an error:

LOWER({Record Name})

However, if I only reference {Record Name} in the formula the error goes away and my desired text appears.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • February 24, 2022

Lookup fields are the trickiest to use in formula fields. This is because they often (but not always) return arrays, not simple text strings or numbers.

Try these versions that convert the array to a string by using & ""

SUBSTITUTE({Record Name} & ""," ","-")
LOWER({Record Name} & "")

Forum|alt.badge.img+16
  • Author
  • Known Participant
  • February 24, 2022

Lookup fields are the trickiest to use in formula fields. This is because they often (but not always) return arrays, not simple text strings or numbers.

Try these versions that convert the array to a string by using & ""

SUBSTITUTE({Record Name} & ""," ","-")
LOWER({Record Name} & "")

Ahhh, perfect. Worked.

As you said. I have referenced Lookup Fields before without any problem.