var submissions = FormRecordSearcher.QueryDataBase(filter);
The error is as follows:
'FormRecordSearcher' does not contain a definition for 'QueryDataBase'
I was initially using Umbraco forms 4.1.4 on Umbraco 7.2.8 but upgraded to 4.4.2 as I noticed the documentation states that it applies to 4.4.1 and higher but upgrading has made no difference.
Can anyone let me know what I may be doing wrong (or if the documentation is incorrect what I should replace the line in question with)?
Hi! I am currrently experiencing the same issue. What I've done know is searching in the codebase (via JustDecompile) how they have implemented it with their own Excel File export type.
Well, they are using QueryDataBase, but have changed FormRecordSearcher to be internal. Awesomeee ...
Here is the screen for the code:
Well, internal stays internal. So we either have to find a new way or re-implement the missing method. I will try both methods and get back to you once I am done.
Just drop the class into your project and call the public method with FormRecordSearcherPublic.QueryDataBase(...).
:-)
PS. I do not know if there's a new or better way to get the results from DB. But as this project (Umbraco.Forms) is not open source and the documentation is outdated, I guess it was at least the fastest way - without reading through the whole IL code.
Custom Umbraco Forms Export to file
I have been trying to follow the documentation for adding a custom export type at: https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Extending/Adding-a-Exporttype using the advanced example but I am getting an error relating to the following line:
The error is as follows: 'FormRecordSearcher' does not contain a definition for 'QueryDataBase'
I was initially using Umbraco forms 4.1.4 on Umbraco 7.2.8 but upgraded to 4.4.2 as I noticed the documentation states that it applies to 4.4.1 and higher but upgrading has made no difference.
Can anyone let me know what I may be doing wrong (or if the documentation is incorrect what I should replace the line in question with)?
Hi! I am currrently experiencing the same issue. What I've done know is searching in the codebase (via JustDecompile) how they have implemented it with their own Excel File export type.
Well, they are using
QueryDataBase
, but have changedFormRecordSearcher
to be internal. Awesomeee ...Here is the screen for the code:
Well, internal stays internal. So we either have to find a new way or re-implement the missing method. I will try both methods and get back to you once I am done.
Got it. I've extracted the
FormRecordSearcher
class from the Forms project and replicated it.Was pretty straightforward, as I only had to revert a few things from the IL code.
Please see this gist for the class: Gist for fixed FormRecordSearcher
Just drop the class into your project and call the public method with
FormRecordSearcherPublic.QueryDataBase(...)
.:-)
PS. I do not know if there's a new or better way to get the results from DB. But as this project (Umbraco.Forms) is not open source and the documentation is outdated, I guess it was at least the fastest way - without reading through the whole IL code.
is working on a reply...