Hello to everyone,
Iโm ever working on my app to record training courses of employee. I created a slice called โExport_Odooโ only with some selected columns from the table โCORSIโ because I have to keep a specific column structure in order to import the csv in the ERP of my company. Now, I tried whit my colleagues the import in the ERP and after some setting, it works correctly and itโs amazing!! But I have a big problem that i hope to overcame with your help. The main problem is that when i import the csv once a month(more or less), the rows are duplicated in the ERP because I also import the data that I have already imported the previous month.
In order to avoid this problem, I think to set a virtual column called โEXPORT_CHECKโ with type โY/Nโ and every time i use action to export some data from the view based on table โExport_Odooโ, is set โYโ on the exported rows. So when i created a new record in the app (a new training course) is applied automatically the value โNโ and on the next export, Iโll export only data whit โNโ. How can i set this features?
I hope I was clear, but I would appreciate your advice to overcome the data duplication problem in every import on the ERP
Tks ALL!!
There are several ways of solving this problem. Let me suggest one.
Add a new DateTime field in table โCORSIโ called โDateAddedโ and give it the InitialValue NOW(). As you add new records to your table the DateAdded field will be assigned the current date/time. In slice โExport_Odooโ filter only those records added since the last time you did an export.
When you first add the new โDateAddedโ field you will need to initialize all existing records in table โCORSIโ to some date/time in the past.
Hi @Phil , I added a new column called โDATA_AGGIUNTAโ with initial value NOW() and i set all existing records in a past date. If i set in slice โExport_Odooโ the filtered condition [DATA_AGGIUNTA]>NOW() of course i donโt see the value to export.
How can i set the condition on order to see only the new record?
Is it possible to export by selecting a particular period?
Tks you!
Create a Slice with a Row filter condition that only includes the newly created records.
Then export that slice.
@Phil Export_Odoo is already a slice. what formula can i use to include only the new records?
You could use a Row filter condition like:
ok, another way is insert a column โCHECK_EXPORTโ type Y/N with initial value โNโ and set in the slice the formula [CHECK_EXPORT]=โNโ. then when i make the export, i set Y the exported data in database. It might works?
Yes, that should work also. You simply need a data column whoโs value indicates the rows of interest.
User | Count |
---|---|
35 | |
35 | |
28 | |
23 | |
18 |