Filter programming

2 questions :

* When importing text file from qpat database, keywords line syntax is written like that :

KEYW- OSCILLATION LOAD (100,1); RED LAMP (95,1); MAINTENANCE STAFF (85,1);

Adding KEYW- Keyword in the filter leads to

OSCILLATION LOAD (100,1)

RED LAMP (95,1)

MAINTENANCE STAFF (85,1)

in the keyword field, which is nice, but I would like to get remove automatically the parenthesis (which are non significant) after the keywords. Doing in manually is really too long as keyword number could be as much as 20 by reference…

And KEYW- Keyword ({IGNORE}) doest work

* Second question : when importing with a correct tag in a field, is it possible to add a word, and a CR for example before the imported text?

BR

Thanks in advance  

If the parentheses are non-significant who cares if they are there or not?  But you could use the “change text” option to remove them all, or to selecte the recently imported records and edit them out of those keywords? 

You could edit the file before importing to insert an extra keyword.  Replace KEYW-<Space> with KEYW-<space>NEW WORD<space>. 

Thanks for the answer…

I see that my demand was not clear enough…:neutral_face:

In fact I want to remove the parentheses,… and also all what is in between

Instead of

OSCILLATION LOAD (100,1)

RED LAMP (95,1)

MAINTENANCE STAFF (85,1)

as a result

I would like to obtain

OSCILLATION LOAD

RED LAMP

MAINTENANCE STAFF

 

 KEYW- OSCILLATION LOAD (100,1); RED LAMP (95,1); MAINTENANCE STAFF (85,1);

 

In response to your first question with a question: Are the parenthetical numbers unique to each keyword and independent of the article? For example the keyword “Oscillation Load” is always affiliated with “(100,1)”; “Red Lamp” is always coded “(95,1)”: and “Maintenance Staff” is always coded “(85,1)”?

If the codes are standardized then you could adjust the QPAT filter’s “Field Editing” setting to exclude these (and other) codes for the Keyword field.

For your second question, it might be possible to add a word by modifying the text file rather than the filter. Adding a word could be done by opening the file in MS Word and using “search and replace” but the caveat is that the success of this approach depends upon the layout of the text file’s data. The data must have some standardization and regularity for search and replace to work.

Unfortunately the codes are not linked to special keywords. In fact it’s only, to my understanding the importance weight of the keyword : 100 the heighest, and the number after the comma indicates the police importance, 1 the biggest.

So ti’s more complicated… and may there is no solution?

The non-standardization of the codes does complicate matters and may mean searching for a “fix” outside of EndNote.

A possible workaround (if you have MS Excel) is to import the text file into Excel then use Excel’s “Text to Column” function to parse the parenthentical codes into a separate column (see attached illustration*). Once the codes have been separated, just delete the column, resave the file as a text file then import the file into EndNote.

_____________

*Note: The illustration just shows the keyword data as a single column but the entire text file would be imported into Excel. 


many thanks for this work…

It could be a trick for a limited number of reference…

and an automatised process is not possible unfortunately…

anyway thanks again for your time