Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unbeantwortet
Untertabellen als Excelexport im Dialog


Man kann über eine DialogFunction xlsx generieren.
Man sammelt die Daten in einer Map und macht dann im JS so etwas in der Richtung (verkürzt aus einem Projekt und ungetestet)

JS:

jr_execute_dialog_function(
                'getXlsx',
                { data: data },
                function(/** @type {{ status: string; result: { data: string; }; }} */ response) {
                    if (response.status === 'ok') {
                        var a = document.createElement('a');
                        a.download = 'export.xlsx';
                        a.href =
                            'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,' +
                            response.result.data;
                        a.click();
                    } else {
                        handleError(response);
                    }
                },
                handleError
            );

PHP

<?php

class className extends JobRouter\Engine\Runtime\PhpFunction\DialogFunction
{
    public function execute($rowId = null)
    {
        require_once(Utility::getJobRouterPath() . '\library\vendor\phpoffice\phpspreadsheet\src\Bootstrap.php');
        $spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
        $spreadsheet->getActiveSheet()->fromArray($this->getParameter('data'));

        ob_start();
        (new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet))->save('php://output');
        $this->setReturnValue('data', base64_encode(ob_get_clean()));
    }
}
  
  
Gepostet vor 2 Jahren
Stefan Köngeter
309 × 7 Administrator
643 Ansichten
0 Antworten
vor 2 Jahren
vor 2 Jahren