Posts: 51
Threads: 17
Joined: Jun 2011
Reputation:
0
Jun 20th, 2011, 8:26 AM
(This post was last modified: Jun 20th, 2011, 8:28 AM by Mark.)
Hi Ben,
Just a minor thing I've noticed in '2.1.0-beta-20110619':
The Export Module doesn't seem to take into consideration the order of columns. For example in the web-view (submissions.php) they are nicely formatted as specified in the View configuration, such as:
Column 1 | Column 2 | Column 3 | Column 4
However when exported via the HTML / Printer-friendly or Excel options this ordering is lost and is pretty much randomised:
Column 1 | Column 4 | Column 3 | Column 2
I had a brainwave that perhaps the Export tool orders the columns by initial creation date, however even when I recreated them in the order I wanted, they still appeared randomly when exported.
- Mark
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Jun 20th, 2011, 9:28 AM
(This post was last modified: Jun 20th, 2011, 9:36 AM by Ben.)
Yeah, this isn't terribly clear, is it? When I added in the new Columns section I wondered about this.
The columns only determines what appears on the Submission Listing page. The printer-friendly + Excel need to show ALL fields in the View, so they pull the column order from the Edit View -> Fields tab, not the Columns tab.
Does that explain the ordering, or is it not even consistent with the order of your View fields?
- Ben
Posts: 5
Threads: 3
Joined: May 2011
Reputation:
0
Hello,
I had exactly the same problem as Mark.
It happened when I update version 2.1.0-beta-20110616 to 20110619.
I take this opportunity to ask how these updates should be made. I used an ftp program and copied the entire directory, deleting the folder "install" file and copying the old config.php
Regards
Rui
Posts: 51
Threads: 17
Joined: Jun 2011
Reputation:
0
Hi Ben / Rui,
(Jun 20th, 2011, 9:28 AM)Ben Wrote: The printer-friendly + Excel need to show ALL fields in the View, so they pull the column order from the Edit View -> Fields tab, not the Columns tab.
Does that explain the ordering, or is it not even consistent with the order of your View fields?
Unfortunately the ordering is still inconsistent even when I reorder the rows in the 'Fields' tab.
(Jun 20th, 2011, 4:01 PM)rnog Wrote: I used an ftp program and copied the entire directory, deleting the folder "install" file and copying the old config.php
I am also replacing all files via FTP, with the exception of the 'install' folder and 'config.php'.
- Mark
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Weird...! I don't remember changing anything that would affect this. I'll check over the code today and let you know.
Thanks for letting me know, guys!
- Ben
Posts: 51
Threads: 17
Joined: Jun 2011
Reputation:
0
(Jun 22nd, 2011, 4:20 AM)Ben Wrote: I'll check over the code today and let you know
Hi Ben,
As before, if you would like access to our test-rig where the problem is current, just PM me.
- Mark
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hey Mark,
Thanks! Yeah, it may come down to that. Just a couple of questions / things to try first.
So the code looks fine - I haven't changed anything since 20110616, so it's something else.
1. What browser & OS are you using? Reason I ask is that the only thing determining the order of those fields is the list_order database field in the view_fields table. If there's a JS error in the Edit View page, it's possible the ordering is somehow getting messed up in the DB. Beyond that, I don't see a cause.
2. Could you try this: go to your Edit View -> Fields page, and just click "Update". Then, in a different tab, go to the Submission Listing page and export the results.
Still out of order?
- Ben
Posts: 51
Threads: 17
Joined: Jun 2011
Reputation:
0
Hi Ben,
I'll give it a go and let you know.
Thanks mate,
- Mark
Posts: 51
Threads: 17
Joined: Jun 2011
Reputation:
0
Hi Ben,
I have found the problem!! Allow me to explain with an example;
For one of my Form views (via the 'Views' tab > 'Fields' mini-tab) I have 5 visible fields displayed over two groups:
======= GROUP 1 =======
ORDER / FIELD NAME
------------------------
1 / Day
2 / Status
3 / Open Time
4 / Close Time
======= GROUP 2 =======
ORDER / FIELD NAME
------------------------
1 / Special Notes
When I export this to a printer friendly view via the Export Manager, they are displayed in the following order:
1. Day - [from group 1]
2. Special Notes - [from group 2]
3. Status - [from group 1]
4. Open Time - [from group 1]
5. Close Time - [from group 1]
This is because the Day field from GROUP 1 and the Special Notes field from GROUP 2 both have an order/sort ID of '1', and therefore they are paired together. The remaining fields from GROUP 1 are displayed after this.
Would it therefore be possible to modify the coding to take the Group order into consideration? Perhaps by prefixing it with hidden letters? e.g. For my example they would appear:
======= GROUP 1 =======
ORDER / FIELD NAME
------------------------
A1 / Day
A2 / Status
A3 / Open Time
A4 / Close Time
======= GROUP 2 =======
ORDER / FIELD NAME
------------------------
B1 / Special Notes
B1 would surely proceed A4 in this example? I'm sure there is technically a better way to resolve this but I lack advanced PHP skills!
Hope my explanation makes sense.
- Mark
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Ahhhh! Of course, yes this makes perfect sense now. Bah, I should have spotted it!
And absolutely: the script should take into account the groups, so it would order the fields as they appear in the page 1-4 in group 1, then 1-4 in group 2.
Thanks for taking the time to get to the bottom of it! I'll include this in the next build.
- Ben
|