[ic] no column name in text file
Mike Heins
mike at perusion.com
Fri Jun 18 00:15:13 EDT 2004
Quoting Jeannie Stevenson (webteam at wes-state.com):
> hello list
>
> I have a question that seems to not be answered by any docs or mail-list
>
> I have a text file that I would like to search. However, the file has no
> column names. The file is Pipe delimited and full of date.
>
> How do I search the text file using IC conventional methods
>
>
> Any help or pointers would be appreciated
Hmm. Seems to me this used to be possible, but I bet it stopped
being possible in Minivend 4.
There is currently no way to return the data from the field in
any sort of addressable fashion.
Logic tells me that:
[loop search="
fi=foo.txt
st=text
fn=code,title,description
hs=0
sf=title
se=tim
rf=*
"]
code=[loop-code]
title=[loop-param title]
description=[loop-param description]
<br>
[/loop]
should work, but it does not as a mv_head_skip value of zero is
ignored.
This little patch to TextSearch.pm enables that:
--- /rt/TextSearch.pm 2003-06-18 22:20:30.000000000 -0400
+++ /dl/TextSearch.pm 2004-06-18 00:04:32.000000000 -0400
@@ -194,6 +194,10 @@
last if $. >= $s->{mv_head_skip};
}
}
+ elsif($s->{mv_field_names}) {
+ $field_names = join $s->{mv_index_delim}, @{$s->{mv_field_names}};
+ }
+
if($field_names) {
$field_names =~ s/^\s+//;
my @laundry = (qw/mv_search_field mv_range_look mv_return_fields/);
That is for a tab-delimited data, you will have to add:
ix=\|
for pipe-delimited.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
Few blame themselves until they have exhausted all other possibilities.
-- anonymous
More information about the interchange-users
mailing list