02-03-2021 02:39 PM
I have an app that needs to store user responses to a web-based questionnaire.
The main workflow of the application page is walking users through a series of questions, and when completed programmatically generate a PDF (based on a PDF Template stored in OnBase) , set the keywords, and Save to OnBase.
The result should be stored as a completed PDF in OnBase, complete with keywords.
(I have created the necessary DocumentType and keywords in OnBase, and added a Template of that DocType to the system.)
This workflow is fine until I get to setting the 3 keywords it needs, and saving a new document.
After saving to OnBase the pre-defined DocumentType Keywords are blank, and three new - but identically named - keywords are created (which are also blank).
I am using the example code from OnBase API training I took in August 2018 as my primary reference.
It might be as simple as finding a more succinct example of setting Keywords on a new document that I can review,
but I cant help but think I am missing something important. Do I have to Save the document first, then fetch it back and set/store keywords?
Any thoughts or pointers appreciated!
02-04-2021 08:53 AM
Make sure you are using a KeywordModifier and make sure to call the ApplyChanges() method on that when you are done. Have a separate function to add a single keyword value to a document with all that code in it and call that function each time you need to add a keyword.
02-04-2021 08:53 AM
Make sure you are using a KeywordModifier and make sure to call the ApplyChanges() method on that when you are done. Have a separate function to add a single keyword value to a document with all that code in it and call that function each time you need to add a keyword.
02-08-2021 09:03 AM
Re-organizing my code along these lines was enough to spot a KeywordType problem and get my workflow working.
Much thanks for the guidance Thilina!
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.