Skip to content
  1. Extras
  2. GoogleSheets
  3. MIGX

MIGX ​

Import/Export MIGX fields.

Settings ​

Settings

FieldDescription
URL tableGoogle Sheet URL
SheetSheet name in the Google Sheet
ResourceResource id
MIGXTV with type migx

Examples ​

  1. You want to store all reviews in a MIGX table. With many reviews, adding them in the manager is slow. It's faster to put the data in a Google Sheet and import it.

  2. You need to change a field in the MIGX table for all rows. Use the gsOnExportValues event.

    php
    <?php
    if ($modx->event->name == 'gsOnExportValues') {
      if ($range == 'MIGX') { // range - sheet name
        $modx->event->params['values'] = array_map(function ($value) {
          if (!empty($value['title'])) {
            // Append date to title
            $value['title'] = $value['title'] . ' ' . $value['date'];
          }
          return $resource;
        }, $values);
      }
    }

After export, check the result in the Google Sheet; if it looks correct, import the data back.