Option 1: Using a Z-Record to create a Filter

  1. Create a guideline

    1. Use EDISIM Standards Editor to add Z-record rules to a PDSA guideline or one that is equivalent (see TIB_fsp_transactioninsight_n.n.n_Data_Types_and_TI.pdf).

      The record can have any ID of up to 4 digits and letters. When Instream writes out its validation detail file, it will add a Z to the front of this ID, and that Z in the first column will allow Foresight Archive and Retrieval System to find it.

      Example

      We will use ZT50 for our example record ID, since this ID will also work with a Transaction Insight transaction filter.

      These rules will put the BEG-03 value into a record called ZZT50 in the validation DTL file. An additional Z is automatically added to the front of the ID during validation so we use ZT50 in our business rule.

      ST segment: define the record

      BEG-03 element: populate the variable and write out the record

    2. Copy the guideline to Instream’s Database directory.

      Be sure the validation profile (APF file) used has these settings in the [Detail Record Output] section:

      IDENT=1

      ZREC=1

    3. Validate some data with it, and check the validation detail results (DTL file) to be sure the ZZT50 record appears with the PO number:

  2. Make the filter tables in the Foresight Archive and Retrieval System database

    This is a job for a database administrator.

    1. Edit ArchiverLoadFilterMaps_version.sql, which comes with the installation files.

      We are going to make a separate table in which to store the ID of each document that match your filter, plus the actual value that matched.

      Read the comments in the script carefully.

    2. If using SQL Server, comment out all EXECUTE lines that have been previously used:

      If using Oracle, comment out all call MakeFilter lines that have been previously used:

    3. Create a new MakeFilter line like the ZZT50 one below, using the same ZZT ID that will appear in the DTL file. The columns are explained in the script’s comments.

      If using SQL Server:

      EXECUTE MakeFilter 'SVALU:BEGBeginningSegment:3','DOCFILTER051',1,'850 Purchase Order Number BEG-03','005010','850','EDI';

      If using Oracle:

      call MakeFilter('SVALU:BEGBeginningSegment:3','DOCFILTER051',1,'850 Purchase Order Number BEG-03','005010', 'EDI');

      Our example Z record in the DTL file is ZZT50.

      TIBCO Foresight recommends starting the table name with DOCFILTER plus a unique number (e.g., DOCFILTER050).

      We used 1, indicating we are recording all instances of the filter information in a file rather than just the first one.

      The last value, EDI, is for X12 documents.

    4. Execute this against the Foresight Archive and Retrieval System database and check to be sure that it made an empty table with the name that you chose:

      You now have a table to hold this filter’s information as data comes in.

    5. Check for a new record in the ArchiveFilterMap table, which defines all Foresight Archive and Retrieval System filters.

      In our example:

      • Rows 1-8 are the EDI Universal Type Filters

      • Row 9 was added with our script

  3. Check the Portal

    Go to Archive > Search > Filter Search and pick the Standard Type and Archive Type – Version. Confirm that the Type Specific Filter is there:

  4. Archive some data that was validated with your Z-record guideline

    1. In the file that you test with your filter, note the value that should be in the filter. In our example, this is the BEG03:

    2. Archive the file.

    3. Try out the filter and see if it finds your file.