• SOLVED: How to move a imported file in aspecific folder based on metadata

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #47410  by OpaHeinz
 
Just to explain situation

I imported a lot of files into a OneKM-folder called "import"
after import I assign each file its metadata.

I wish that a nightly(crontab) script scans the import folder and based on the assigned meta-data moves the imported files into its own/special "taxonomy folder"
If there is no metadata assigned, then the file should still stay in the "import"-folder
Any idea/ experience for such a requirement would be wonderfull!

Thank you in advance
rgds
Heinz
Last edited by OpaHeinz on Thu Feb 07, 2019 4:43 pm, edited 1 time in total.
 #47412  by dferguson
 
You write a SQL query to select all items in the "import" folder based on metadata;
Code: Select all
select NBS_UUID from OKM_NODE_BASE inner join OKM_NODE_PROPERTY on OKM_NODE_BASE.NBS_UUID = OKM_NODE_PROPERTY.NPG_NODE 
where OKM_NODE_BASE.NBS_PARENT = 'parent folder UUID' and OKM_NODE_PROPERTY.NPG_GROUP = 'okp:your.metadata'
Then you can do an update to change the NBS.PARENT to the new parent folder UUID.
Some documentation on the database...
https://docs.openkm.com/kcenter/view/ok ... ption.html

However, why don't you do an automation that validates based on metadata and then moves after metadata is applied?

https://docs.openkm.com/kcenter/view/ok ... ation.html

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.