Go Back   Scooter Forums > Beyond Compare 3 Discussion > Other Session Types
Register FAQ Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 21-Oct-2008, 12:52 PM
Regressie Regressie is offline
Journeyman
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 15
Question 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!
Reply With Quote
  #2  
Old 22-Oct-2008, 08:19 PM
Michael Bulgrien Michael Bulgrien is offline
Carpal Tunnel
 
Join Date: Oct 2007
Location: Pennsylvania
Posts: 1,766
Default

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 v3.3.5 build 15075
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply With Quote
  #3  
Old 03-Nov-2008, 04:44 AM
Regressie Regressie is offline
Journeyman
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 15
Default

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.
Reply With Quote
  #4  
Old 03-Nov-2008, 02:47 PM
Craig Craig is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 2,097
Default

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.
__________________
Craig P Scooter Software
Reply With Quote
  #5  
Old 04-Nov-2008, 06:21 AM
Regressie Regressie is offline
Journeyman
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 15
Default

Is it something that could be built in, in a newer version, perhaps?
Reply With Quote
  #6  
Old 04-Nov-2008, 12:45 PM
Craig Craig is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 2,097
Default

I can add it to the wishlist, but I wouldn't expect it anytime soon.
__________________
Craig P Scooter Software
Reply With Quote
  #7  
Old 05-Nov-2008, 03:45 AM
Regressie Regressie is offline
Journeyman
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 15
Default

Alright, that would be great, thank you.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 02:04 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.