May 20, 201213 yr I've just run into an odd problem (FM 8.5). I've got a membership list that I generate in a script and then Save Records as Excel. In the resulting XL file, the last (i.e. right-most) field in the FM layout appears as the second column. If, instead, I Export Records to Excel and specify field order, the resulting XL file is just what I expect. Any ideas what might be causing the odd behaviour in Save to Excel?
May 20, 201213 yr Hi Peter, Save As Excel depends upon the order the fields exist on the layout. However, table view (of the same layout) can hold different field orders than form view and they will Save As Excel in different order. Form and list views save the fields in order that they appear on the layout (top to bottom) so if field #5 is to the right of Field #4 but 1 px higher, field 5 will appear before field 4. The only way to change this order is to change the order the fields appear on the layout. But if you switch to table view (on same layout), you can arrange the columns into different order and Save As Excel will use that order. It is best to use different layouts instead of switch to table view because table view doesn't work with portal (will only display first related), tab panel (will only display fields on front tab) and buttons won't fire. If these wouldn't be affected, you can arrange the fields in table view as you want them then in script: Freeze Window View As Table Save As Excel View As Form Usually another layout for your table view works best particularly with newer version of FM where triggers and tabs might come into play. :^)
Create an account or sign in to comment