• Adding Folder thru Scripts

  • 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.
 #46512  by dyjol
 
Hi I'm adding folders thru script but I cannot search the folder. Am I missing something?

But if I create a folder thru the user interface, that folder can be search.

For your assistance.

Thank you very much.
Code: Select all
INSERT INTO `OKM_NODE_BASE`  (`NBS_UUID`,  `NBS_AUTHOR`,  `NBS_CONTEXT`,  `NBS_CREATED`,  `NBS_NAME`,  `NBS_PARENT`,  `NBS_PATH`,  `NDC_SCRIPT_CODE`,  `NDC_SCRIPTING`) VALUES('ae331132-239c-4a42-614b-d1cb0a5f6ff8','okmAdmin','okm_root','2018-08-01:00:00:00','test name','fe10130d-5e37-4729-a676-e5ec75bd978d',null,null,'F');	

Insert into `okm_node_folder` (`NFL_DESCRIPTION`,`NBS_UUID`) VALUES ('AALA, AMIE MAGLINAO-001070101201207', 'ae331132-239c-4a42-614b-d1cb0a5f6ff8');	Insert into `okm_node_user_permission` (`NUP_NODE`,`NUP_PERMISSION`,`NUP_USER`) VALUES ('ae331132-239c-4a42-614b-d1cb0a5f6ff8',15,'okmAdmin');		

Insert into `okm_node_role_permission` (`NRP_NODE`,`NRP_PERMISSION`,`NRP_ROLE`) VALUES ('ae331132-239c-4a42-614b-d1cb0a5f6ff8',15,'ROLE_USER');	

Insert into `okm_activity` (`ACT_ID`,`ACT_ACTION`,`ACT_DATE`,`ACT_ITEM`,`ACT_PARAMS`,`ACT_PATH`) VALUES (5,'CREATE_FOLDER','2018-08-06:00:00:00','ae331132-239c-4a42-614b-d1cb0a5f6ff8',null,'/okm:root/test folder/test name');
 #46529  by lnovoa
 
Hi!,

when you have inserted from the database, go to administration and do rebuild indexes.
When you create from the interface this does it automatically but from the database, as it is logical it does not do it.
 #46536  by jllort
 
Very bad practice creating from the database layer, why?

Your queries should be into a single translation, but I repeat is a bad idea.

Should be better to use scripting, can you explain the reason why must be done in this way? some explanation of the problem you are trying to solve is welcome.

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.