Announcement

Collapse
No announcement yet.

Data compare - filter by recordtype

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Data compare - filter by recordtype

    Is it possible to filter lines by a recognizing a character that represents the recordtype?

    For example I have 2 types of lines in my data file:
    "1-asd-asd-asd-asd-asd" and
    "2-asdfe--asdfe--asdfe--asdfe--asdfe"
    where the 1 and the 2 (pos 1 of every line) determine the format characteristics of the line.

    Is it possible to perform a compare only on the lines that start with a "1"?

    Thanks in advance!

  • #2
    Absolutely,

    Go to Tools\File Formats...
    Click New..., click OK to create a new Text Format
    Give your new file format a name and specify a file mask if you wish (optional)
    Click on the Grammar tab
    Click New..., give your new element a name describing the record type
    Choose the Lines category and use a Regular expression
    Enter ^1 in the "Text matching" field and set the "next" spinbox to 0
    (the caret indicates that the expression begins at the start of a line)
    Click OK, Save, Close

    When back in the text compare, choose your new file format in the "File Info" header on both sides
    (If the File Info header is not visible, select it from the View dropdown menu)
    Click on Session Settings (referee icon), choose the Importance tab
    Make sure your record type gammar element is checked to make it important
    Uncheck the Everything Else checkbox, click OK
    Click the Ignore Unimportant Differences button on the toolbar ()
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment


    • #3
      Thank you for your answer.

      Actually I was trying to refer to the Data Compare instead of the Text Compare. Do you know if it is also possible in the Data Compare section? It would really help.

      Comment


      • #4
        Sorry, the data compare doesn't support this natively. If you're able to, you could handle this by converting the files to CSV externally and stripping out the '2' lines. You could then plug that into the file format as an external conversion.
        Zoë P Scooter Software

        Comment


        • #5
          Is it something that could be built in, in a newer version, perhaps?

          Comment


          • #6
            I can add it to the wishlist, but I wouldn't expect it anytime soon.
            Zoë P Scooter Software

            Comment


            • #7
              Alright, that would be great, thank you.

              Comment

              Working...
              X