Rename a file using the information contained in a pdf.

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Hello,
I'm re-launching the subject to try to move things forward in a different way.

I have a question about using tables.
Would it be possible to search in a table without having to select the first line?
I'd like to refine my searches gradually.

For example :
Search for a date range first.
Then, within this date range, search for an amount in another column.

---

Bonjour,
Je relance le sujet pour essayer d'avancer autrement.

Je me pose une question sur l'utilisation des tableaux.
Serait-il possible d'utiliser la recherche dans un tableau sans devoir sélectionner la première ligne.
Je souhaiterais affiner mes recherches progressivement.

Par exemple :
Rechercher en premier une plage de date.
Et, après, dans cette plage de date, rechercher un montant dans une autre colonne.
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Can you provide an example?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Your bank statement in cvs format.

As I've been doing since the beginning of the forum post, I'm trying to automatically rename my invoices using the contents of the bank statement (at first, it was via the pdf statement, then I thought I could have cvs).

My invoices have an invoice date, but not necessarily the same as the one on the statement.
And, for organisational purposes, I prefer to organise my invoices using the statement date rather than the invoice date. My invoices are named as follows: yyyymmdd invoice name 00.00€.pdf

This automatically sets the date of my PDF. I need to search the statement for the amount, date and wording.
In my search in the table, I was hoping to start by looking for all the lines in the same month.
Then search these rows for the amount corresponding to my PDF.
And finally, check whether the amount corresponds to the wording.
If it does, I rename it using the information from the bank statement.

Do you see what I mean?

---

Votre relevé de banque au format cvs.

Comme depuis le début du post du forum, je recherche à renommer automatiquement mes factures par le contenu du relevé de banque (au début, c'était via le relevé pdf, puis j'ai réfléchi que je pouvais avoir des cvs).

Mes factures ont une date de facturation, mais pas forcément la même que celle sur le relevé.
Et, pour mon organisation, je préfère organiser mes factures via la date du relevé plutôt que celle de la facture. Mes factures sont nommées de cette manière : aaaammdd facture name 00,00€.pdf

Afin de définir automatiquement la date de mon PDF. Je dois chercher dans le relevé le montant, la date et le libellé.
Dans ma recherche dans le tableau, j'espérai commencer à rechercher toutes les lignes du même mois.
Ensuite rechercher dans ses lignes le montant correspondant à mon PDF.
Et, enfin, vérifier si le montant correspond au libellé.
Si c'est le cas, je renomme par les informations du relevé de banque.

Vous voyez ce que je veux dire ?
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Please give me a concrete example. Provide an actual file going through this workflow with concrete data.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Image
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Again, can you describe how this table is used in relation to a specific file?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I don't understand what more you want, given that I've already explained the idea here.
The screenshot is the CSV. The PDFs are my invoices.

I'd like to search first for the date in the CSV, then in the results search for an amount, which will give me the label that will be used to rename my pdf.


hercut wrote:Your bank statement in cvs format.

As I've been doing since the beginning of the forum post, I'm trying to automatically rename my invoices using the contents of the bank statement (at first, it was via the pdf statement, then I thought I could have cvs).

My invoices have an invoice date, but not necessarily the same as the one on the statement.
And, for organisational purposes, I prefer to organise my invoices using the statement date rather than the invoice date. My invoices are named as follows: yyyymmdd invoice name 00.00€.pdf

This automatically sets the date of my PDF. I need to search the statement for the amount, date and wording.
In my search in the table, I was hoping to start by looking for all the lines in the same month.
Then search these rows for the amount corresponding to my PDF.
And finally, check whether the amount corresponds to the wording.
If it does, I rename it using the information from the bank statement.

Do you see what I mean?

---

Votre relevé de banque au format cvs.

Comme depuis le début du post du forum, je recherche à renommer automatiquement mes factures par le contenu du relevé de banque (au début, c'était via le relevé pdf, puis j'ai réfléchi que je pouvais avoir des cvs).

Mes factures ont une date de facturation, mais pas forcément la même que celle sur le relevé.
Et, pour mon organisation, je préfère organiser mes factures via la date du relevé plutôt que celle de la facture. Mes factures sont nommées de cette manière : aaaammdd facture name 00,00€.pdf

Afin de définir automatiquement la date de mon PDF. Je dois chercher dans le relevé le montant, la date et le libellé.
Dans ma recherche dans le tableau, j'espérai commencer à rechercher toutes les lignes du même mois.
Ensuite rechercher dans ses lignes le montant correspondant à mon PDF.
Et, enfin, vérifier si le montant correspond au libellé.
Si c'est le cas, je renomme par les informations du relevé de banque.

Vous voyez ce que je veux dire ?
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

It's not clear where these values are coming from but in general, you use two custom table attributes, each with different columns. The caveat here is that the values must be unique in each column. For instance, each date must be distinct. If that is not possible, then the alternative would be to combine the two columns into one.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:It's not clear where these values are coming from but in general, you use two custom table attributes, each with different columns. The caveat here is that the values must be unique in each column. For instance, each date must be distinct. If that is not possible, then the alternative would be to combine the two columns into one.


How use two custom table ?
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Have you read the relevant parts of the manual?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Have you read the relevant parts of the manual?


Yes, i dont find fort two custom table.
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Oh, you mean two attributes. Create one, then later, you will see that one available to drag in. Drag it in and click on it and change which column it refers to.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I just can't do it :'(

In order to narrow down and go along with what you're telling me, which is to merge the date column and the label column for example. I would need to go a little further.
The date in the file is in the format yyyyMMdd, but the problem is that the dd representing the days is not correct, as it represents the invoice date, whereas in the table (CSV) it is the bank execution date. (That's why I want to modify the file name automatically, among other things.)
So, I think I could search for the "yyyymm" date and the "label", so "yyyymm label".
But I can't exclude the day "dd" in order to search for the "yyyymm label" token in my table.
Is it impossible to create your own token based on elements you already have? (I already have yyyymm and label)

---

Je n'y arrive décidément pas :'(

Afin de pouvoir restreindre et allé dans ce que vous me dites, c'est a dire fusion la colonne date et labl par exemple.
J'aurais besoin d'aller un peu plus loin.
la date du fichier est aaaammjj mais le problème c'est que jj représentant les jours, n'est forcément pas bon, puisqu'il représente la date de la facture, alors que dans le tableau (csv) c'est al date d'exécution de la banque. (c'est pour ca que je souhaite modifier le nom du fichier auto entre autres.)
Donc, je me dis que je pourrais chercher la date "aaaamm" et le "label", donc "aaaamm label".
Mais je n'arrive pas à exclure le jour "jj" afin de chercher le token "aaaamm label" dans mon tableau.
Il est impossible de créer son propre token à base d'élément que l'on a déjà ? (j'ai déjà aaaamm et label"
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Actually, I could simply exclude the day from my invoices.
But I think it would be great to be able to create our own token in such conditions.
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

You could try finding the date by using a text attribute instead of date and only match against the year and month parts of it.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

PreviousNext

Return to Open Discussion