WebGUI
      Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Report a Bug > WebGUI Bug Tracker

DataForm does not export entry information

User mlamar
Date 4/18/2007 4:01 pm
Severity Minor (annoying, but not harmful)
Version WebGUI 7.x
Views 261
Rating -2    Rate [
|
]
Karma Rank 0.000000
Previous · Next
User Message
mlamar

When exporting tab-delimited data from a DataForm, only the field names and values are exported.  None of the "extra" information about the entry (such as entryId, username, submissionDate) are exported. 

I am filing this as a bug report rather than a feature request because in reviewing the code (DataForm::www_exportTab), it appears that this extra info was meant to be exported, as it is gathered into the data array here:

        while (my $entryData = $entries->hashRef) {
$data[$i] = {
entryId => $entryData->{DataForm_entryId},
ipAddress => $entryData->{ipAddress},
username => $entryData->{username},
userId => $entryData->{userId},
submissionDate => $self->session->datetime->epochToHuman($entryData->{submissionDate}),
};

However, later when the actual text to export is created, only fields from the DataForm_field table are pulled out, so the fields defined above do not get exported:

                foreach my $fieldId (keys %fields) {
next if (isIn($fields{$fieldId}, qw(to from cc bcc subject)) && $noMailData);
my $value = $record->{$fields{$fieldId}};
$value =~ s/\t/\\t/g;
$value =~ s/\r//g;
$value =~ s/\n/;/g;
push(@row, $value);
}
$tab .= join("\t", @row)."\n";

 Where %fields is defined above as:

        my %fields = $self->session->db->buildHash("select DataForm_fieldId,name from DataForm_field where
assetId=".$self->session->db->quote($self->getId)." order by sequenceNumber");

 



Back to Top
Rate [
|
]
 
 
colink

Fixed in 7.3.16

It's SVN rev 4038 if you want to check it out sooner ;) 



Back to Top
Rate [
|
]