Is it possible in the production version to concatenate fields when generating a report? For example, I would like to concantenate the fields (first, MI, Last name) into one field in my report instead of having each field in the report.
Is it possible to include advanced filtering and sorting options? For example, I would like to filter my report by State, City, Last name begins with "B".
Is it also possible to generate a report from more than one webform? For example, I would like to generate a report based on my Personal webform and my General webform.
In addition, I would like to generate a report based on the webforms and the group fields (i.e. Taxonomy, Profile, Node, Node revisions, etc.) is this possible in the current version of Webform Reports or is this and those mentioned above are being considered in the next release of Webforms Reports.
Lastly, is there any tutorial available on Webform Reports that I can referrence ?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 930514-2.patch | 1.85 KB | jimbullington |
| #6 | 930514.patch | 1.73 KB | jimbullington |
Comments
Comment #1
jimbullington commentedEnhancements such as the ones you have suggested will not be made to the current production version (6.x-1.x), but to the current 6.x-2.x (in beta).
I'm not sure how we could implement field concatenation, except by allowing custom PHP code, which I am wary of at the present time.
This should be possible with the 6.x-2.x version. I am working on a new beta that will include this in the report view as well as the definition.
It is not possible to generate a report from two webforms at this time.
Sorry, I'm afraid I don't understand this request. Can you clarify?
Unfortunately, like a lot of open-source projects, the documentation lags behind the implementation. I hope to improve on this in the future.
Thanks for your suggestions.
Comment #2
LPanton commentedRegarding the ability to generate a report based on Webforms and the group fields, I would like to generate a report based on a registration webform that I have created and the Profile group fields. The Profile groups fields that I am referring to are those that you select when creating a view. From the View module, you have the option of creating a view based on the Profile, Node, Taxonomy, etc. which has information such as Username, email address, etc.).
When can we expect Webform Report version 6.x-2.x (beta) to be released?
Comment #3
todd zebert commentedI'd like to see these two of LP's feature requests:
* "Is it possible to include advanced filtering and sorting options? ..."
I know JB your response was (in a way) "...except by allowing custom PHP code, which I am wary of at the present time."
That was exactly what I was looking for. Perhaps some sort of regex, or Token support?
* "In addition, I would like to generate a report based on the webforms and the group fields (i.e. Taxonomy, Profile, Node, Node revisions, etc.)"
This would be great also.
Thanks!
Comment #4
jimbullington commentedOK - it shouldn't be to hard to add a token_replace() call when processing filters so you can put something like [node-title] in a filter value. Do you think that would help?
As for PHP support - that is very dangerous for obvious reasons. But, since several seem to want it, I may add another module for PHP support that will need to be enabled. Maybe under Add Column have a selection of PHP Code and provide a textarea for the code? I'll think about it...
Comment #5
todd zebert commentedJim,
Thanks for your time on this request.
I was trying to generalize my request, but here's my use case, that I'm trying to figure out a solution for:
* I have a simply webform that essentially has a couple dozen "instances", but I don't to create and maintain each individually (plus creating and deleting a set of them on a recurring basis).
* Each "instance" has only a user (or perhaps a couple) that should be able to submit to, edit & delete
* A subset of users should be able to see view or more "instances" based on role, group (or some other method)
When I started looking at this I was using in conjunction with OG, so that each "instance" would be tied to an OG, but I may not go that way.
Since the webform includes Submitted By, I could Filter on it dynamically, perhaps on the current OG group.
Or, I could include a hidden element in the webform itself which captured the OG group, or some other identifying I could later Filter on.
Thanks.
Comment #6
jimbullington commentedThe attached patch applies token_replace() to filter values. Global tokens, submitter user tokens, and webform node tokens will be replaced in filter values. So, if you specify [title] in the filter value, the value would be replaced with the webform title, which you could compare with a text field value - kind of useless, but just an example.
I don't know if this will help you or not. Let me know if you think of anything else we could try.
Comment #7
todd zebert commentedThanks Jim,
I applied the patch manually as I already applied the delete option patch.
I made a simple webform and populated 3 submissions, one each from a user. I tested and it worked.
As "admin"
Filter
Name: Submitted by User
Type: String
Filter Type: Equals
Filter Value: [user-name]
I tried Filter Type: Does Not Equals, and that worked.
I used masquerade to user "Ms. D B" but report incorrectly showed records by all three users (including "Ms. D B").
I opened another browser, logged in directly as "Ms. P B" incorrectly showed records by all three users (including "Ms. P B").
I changed the Filter back to Equals.
The masqueraded user showed incorrectly "There are no submissions that match the criteria for the selected webform."
The logged in user also showed incorrectly.
BTW, what does Filter Type of "none" mean?
Comment #8
jimbullington commentedThank you for the detailed feedback. Try the attached patch - I think the upper case was messing it up. Here is the new code in webform_report.inc since you are patching manually:
Comment #9
todd zebert commentedWell I do use the patch's line #'s! All you did is move the $filter_value = strtolower(trim($filter_value)) later in the processing? Makes sense.
repeating the previous test:
As "admin"
Filter
Name: Submitted by User
Type: String
Filter Type: Equals
Filter Value: [user-name]
This didn't work, nor did it work for a non-admin user, "There are no submissions that match the criteria for the selected webform. "
I tried Filter Type: Does Not Equals
This didn't work, nor did it work for a non-admin user, as it incorrectly showed records by all three users.
Sorry Jim. Could it be white space handling?
On a related solution note, I'm struggling with the very limited internal token support that Webforms has, along with the limited Views. Ugh.
Comment #10
jimbullington commentedThanks for testing. Also notice that at the top of the snippet:
was changed to:
I don't think it is a whitespace issue - perhaps you could insert some echoes to see what $filter_value and $filter_data are before the compare...
Comment #11
todd zebert commentedD'oh!! I missed the semicolon on that line.
Also, what does Filter Type of "none" mean? And how does one "escape" the token eval, say if one wanted to actually compare something to "[something]"?
Retest:
Same incorrect results as above.
here's the debug code:
the actual user names:
Ms. Debbie Perez
Ms. Patrice Bouffard
Interestingly, the echo's show at the top of the page source and while Firefox will print them, chrome chokes on it, thus the html comment format.
Thanks!
Comment #12
jimbullington commentedThis may be a stupid question, but do you have the Token module enabled? It doesn't look like the token [user-name] is being replaced. It works fine on my test system here.
Comment #13
todd zebert commentedIt's worth asking! Token 6.x-1.15 is enabled and I know it's worked in the recent past as I use for file upload pathing.
To be sure, I added
and got back in the page source:
You're right though, it doesn't look like it's being replaced.
Comment #14
jimbullington commentedOK - I would like to see if it's loading the user - can you add the following debug lines or something similar:
Let me know what you get.
Comment #15
todd zebert commentedAs Admin:
Comment #16
jimbullington commentedSorry, I'm at a loss here - the user object looks valid to me. I guess you would have to do some debugging in the token module to see why it's not replacing the values.
Comment #17
jimbullington commentedComment #18
train commentedA little input...
I was also having the same issue of the token not working in a 'Submitted By User' filter, specifically [user-name].
Turns out my problem was I didn't have the 'Submitted By User' field as one of my report columns. Once I added the field as a column, the filter and token work just fine.
Comment #19
jimbullington commentedThanks for the info!! Glad you got it working!!