Cheatsheet part 3

Checkboxes and regions

Solution: Mix it up

After you've completed all the Mix it up steps in the tutorial, the final config is:

{
  "fields": [
    {
      "id": "preference_tues_fruit",
      "anchor": {
        "match": [
          {
            "type": "includes",
            "text": "tuesday"
          },
          {
            "type": "includes",
            "text": "fruit"
          }
        ]
      },
      "method": {
        "id": "checkbox",
        "position": "left"
      }
    },
    {
      "id": "preference_wed_fruit",
      "anchor": {
        "match": [
          {
            "type": "includes",
            "text": "wednesday"
          },
          {
            "type": "includes",
            "text": "fruit"
          }
        ]
      },
      "method": {
        "id": "checkbox",
        "position": "left"
      }
    },
    {
      "id": "tuesday_all_options",
      "anchor": "tuesday",
      "method": {
        "id": "region",
        "start": "below",
        "width": 6.8,
        "height": 0.5,
        "offsetX": -0.5,
        "offsetY": 0
      }
    },
    {
      "id": "disclaimer_paragraph_and_more",
      "anchor": {
        "match": {
          "type": "startsWith",
          "text": "please note"
        }
      },
      "method": {
        "id": "documentRange",
        "includeAnchor": true,
        "stop": {
          "type": "startsWith",
          "text": "mix it up"
        }
      }
    }
  ]
}

Solution: Challenges

After you've completed all the Challenges steps in the tutorial, the final config is:

{
  "fields": [
    {
      "id": "preference_tues_grits",
      "anchor":  "grits",
      "method": {
        "id": "checkbox",
        "position": "left"
      }
    },
    {
      "id": "preference_wed_fruit",
      "anchor": {
        "match": [
          {
            "type": "includes",
            "text": "wednesday"
          },
          {
            "type": "includes",
            "text": "fruit"
          }
        ]
      },
      "method": {
        "id": "checkbox",
        "position": "left"
      }
    },
    {
      "id": "wednesday_all_options",
      "anchor": "wednesday",
      "method": {
        "id": "region",
        "start": "below",
        "width": 7.5,
        "height": 0.5,
        "offsetX": -0.5,
        "offsetY": 0
      }
    },
    {
      "id": "disclaimer_paragraph_and_more",
      "anchor": {
        "match": {
          "type": "startsWith",
          "text": "please note"
        }
      },
      "method": {
        "id": "documentRange",
        "includeAnchor": true,
        "stop": {
          "type": "startsWith",
          "text": "mix it up"
        }
      }
    }
  ]
}

Learn more

To learn more about the steps you took in the tutorial, see:

LinkNotes
CheckboxA frequently used extraction method.
Document RangeA frequently used extraction method.
RegionA frequently used extraction method.
Match arraysNarrow down a match when multiple match candidates exist.

Initial config

To undo all your changes, paste the following config into the left pane of the JSON editor:

{
  "fields": [
    {
      "id": "preference_monday_fruit",
      "anchor": {
        "match": [
          {
            "type": "includes",
            "text": "monday"
          },
          {
            "type": "includes",
            "text": "fruit"
          }
        ]
      },
      "method": {
        "id": "checkbox",
        "position": "left"
      }
    },
    {
      "id": "preference_wed_fruit",
      "anchor": {
        "match": [
          {
            "type": "includes",
            "text": "wednesday"
          },
          {
            "type": "includes",
            "text": "fruit"
          }
        ]
      },
      "method": {
        "id": "checkbox",
        "position": "left"
      }
    },
    {
      "id": "tuesday_all_options",
      "anchor": "tuesday",
      "method": {
        "id": "region",
        "start": "below",
        "width": 6.8,
        "height": 0.5,
        "offsetX": -0.5,
        "offsetY": 0
      }
    },
    {
      "id": "disclaimer_paragraph",
      "anchor": {
        "match": {
          "type": "startsWith",
          "text": "please note"
        }
      },
      "method": {
        "id": "documentRange",
        "includeAnchor": true,
        "stop": {
          "type": "startsWith",
          "text": "in part 2"
        }
      }
    }
  ]
}