Hi,
I attempted to send data in smaller chunks from JavaScript to CSPro and wanted to partial save, but it doesn't seem to work as expected. Are there any alternative approaches?
For instance, I need to collect Yes/No/Don't Know responses for 200 items and would like to save the data in batches of 10 items at a time.
Thanks
Partialsave from JS
Re: Partialsave from JS
Hello,
It's possible and I did something similar a few years ago, when first I tested CSPro 7.7 Alpha versions. Among other ways, you can use writecase to save each form input in specific external dict item trough user defined functions. Then, you can call this user defined function in JS. If you have a lot of items, for more efficiency, you can call the CSPro function inside the webview's worker thread. In JS you can define event and/or timer to save at specific interval.
However, you'll have to deal with delete/Modify HTML form input also... So, you need a lot of functions.
There's an existing very advanced CSPro-JS framework wrapping HTML/CSS forms, JS events etc in CSPro logic user defined functions. This framework greatly facilitate such operations. It come from this project: https://agrilinks.org/post/modernizing- ... ta-quality and they are working to improve and release it as open source in the future.
In the meantime, if lot of users require these functionalities, maybe the CSPro developer Team will integrate such advanced features natively in future CSPro's versions.
Hope this help.
It's possible and I did something similar a few years ago, when first I tested CSPro 7.7 Alpha versions. Among other ways, you can use writecase to save each form input in specific external dict item trough user defined functions. Then, you can call this user defined function in JS. If you have a lot of items, for more efficiency, you can call the CSPro function inside the webview's worker thread. In JS you can define event and/or timer to save at specific interval.
However, you'll have to deal with delete/Modify HTML form input also... So, you need a lot of functions.
There's an existing very advanced CSPro-JS framework wrapping HTML/CSS forms, JS events etc in CSPro logic user defined functions. This framework greatly facilitate such operations. It come from this project: https://agrilinks.org/post/modernizing- ... ta-quality and they are working to improve and release it as open source in the future.
In the meantime, if lot of users require these functionalities, maybe the CSPro developer Team will integrate such advanced features natively in future CSPro's versions.
Hope this help.
G.VOLNY, a CSProuser from Haiti, since 2004