Forum Discussion

Flo's avatar
Flo
Qrew Trainee
1 month ago
Solved

Help — Am I doing something wrong? Find() always returns 0 on a Rich Text field

I've been going in circles on this and can't figure out if I'm making a mistake or hitting a platform limitation. Would really appreciate any insight.

What I'm trying to do

I have a Rich Text field called [Jira ID - Description] that contains HTML like this:

<p><b>Tool Link(s):</b> <a href="https://example.com/...">Group 1</a><br/> <b>Request Note:</b> N/A</p>

I'm trying to extract the link text ("Group 1") using standard text formula functions.

The weird part

These two expressions on the same field, same record give me contradictory results:

Contains([Jira ID - Description], "Tool Link") → True
Find("Oak Link", [Jira ID - Description]) → 0

How can Contains find the text but Find can't? I've tried every capitalization variation, I've triple-checked the record ID in the formula checker, and the field preview clearly shows the content is there. Length() returns 800, so the field isn't empty.

What I've already tried

  • Mid() — always returns blank
  • Left() and Right() — same, always blank
  • The formula checker preview shows the correct HTML content in the field

My question

Is Find() just broken on Rich Text fields? Do I need to use a completely different approach? Is there a ToText() wrapper or something that would make positional functions work?

Any help appreciated — this has cost me way more time than it should have!

  • Looks like you have the order of the search string and field switched.

    Try:  

    Find( [Jira ID - Description], "Tool Link"))

     

    Find (Text str, Text searchString)

    Description: Returns the index where searchString starts to appear in str. If not found returns 0.

    Example: Find("Hello World", "Wo") returns 7
    Find("Hello World", "H") returns 1
    Find("Hello World", "X") returns 0 

4 Replies

  • I would wrap the Rich Text field in ToText to see if that fixes it.  Have you tried that yet?

  • Flo's avatar
    Flo
    Qrew Trainee

    `ToText()` has no effect. Still not working. Have you seen something similar before?

    • hueyal's avatar
      hueyal
      Qrew Cadet

      Looks like you have the order of the search string and field switched.

      Try:  

      Find( [Jira ID - Description], "Tool Link"))

       

      Find (Text str, Text searchString)

      Description: Returns the index where searchString starts to appear in str. If not found returns 0.

      Example: Find("Hello World", "Wo") returns 7
      Find("Hello World", "H") returns 1
      Find("Hello World", "X") returns 0 
      • Flo's avatar
        Flo
        Qrew Trainee

        Thank you! I stared at that one way too long. And it was just RTFM.