How do I check if something was tagged in a text field?

image
Expected result:
Row 1: False
Row 2: True

1 Like

Could you provide some more details about what it is you’re looking to achieve?

1 Like

I want to use a formula that will return true or false whether something was tagged in a text field. I want to ensure that I didn’t miss using tags where I should.

What do you mean with tagged in a text field? Are you thinking about checkboxes?

I mean tagged as shown here:
image

Using the @ function. I kept trying to use Contains or Find or RegexMatch but for some reason ‘@’ doesn’t exist to those. But Substitute can see the @ just fine.

I suggest checking for the actual row IDs instead :slight_smile:

Get Row ID:

thisRow._Merge().ParseJSON("identifier")

Get references in text:

Table77.Filter(thisRow.Text._Merge().ContainsText(CurrentValue.[Row ID]))
1 Like

Cool! I don’t really get what your formulas do exactly but I was able to get it to work by checking if “Table77.Filter(thisRow.Text._Merge().ContainsText(CurrentValue.[Row ID]))” exists.

Create an additional column to see what values we are working with

thisRow.Text._Merge().ToText()

Looks like this for the first row for example, notice the identifier

{
  "root": {
    "children": [
      {
        "id": "cl-Qv8dejnaQb",
        "type": "Line",
        "style": "Paragraph",
        "children": [
          {
            "text": ""
          },
          {
            "id": "esv-zbcQc5ag67",
            "type": "InlineStructuredValue",
            "value": {
              "name": "Bravo",
              "type": "ref",
              "objectId": "grid-W3t_CbMG09",
              "identifier": "i-ctzF8rkhgM"
            },
            "children": [
              {
                "text": ""
              }
            ]
          },
          {
            "text": " "
          }
        ],
        "alignment": "Left",
        "lineLevel": 0
      }
    ]
  },
  "type": "slate"
}
1 Like