<div dir="ltr"><div>Well, I did get it working, albeit with more lines than I wanted to write but alas it's working as I need it to.....thankfully</div><div>Thanks again Richard</div><div><br></div><div>From the data files I've seen, I've encountered a max of 6 pieces of data in a single field that I've had to parse.....but I can tell by looking at it that there are going to be some that have more....</div><div>specifically 1 field....so I wrote that to accept up to 20 -- we will see how it goes....</div><div>Until we started getting live data, I won't truly know but at least if I need to add more, I know how to...</div><div>thanks again</div><div>Scott</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 17, 2018 at 4:42 PM, Fairlight via Filepro-list <span dir="ltr"><<a href="mailto:filepro-list@lists.celestial.com" target="_blank">filepro-list@lists.celestial.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That would always presume your array is dynamically sized, or big enough to<br>
contain whatever you exploded to. fP requires static dimensioning, and also<br>
has a 999 element limit, if memory serves.<br>
<br>
There're reasons #1 and #2 why fP can't gracefully support such a function.<br>
<br>
m-><br>
<br>
On Wed, Jan 17, 2018 at 03:25:35PM -0600, Richard D. Williams via Filepro-list thus spoke:<br>
<div class="HOEnZb"><div class="h5">> Top Post:<br>
><br>
> Scott,<br>
><br>
> Yes and no. I wish there was a function like in php where you could<br>
> just explode the string into an array, but alas, there is not.<br>
><br>
> What I do is test the imported field value for a "^".<br>
><br>
> If it does not contain the "^", well, you just do what you program<br>
> normally does.<br>
><br>
> If it does contain the "^", this is what I do.<br>
><br>
> dim specval(20)<br>
><br>
> n(3,.0)=""<br>
><br>
> z="abc1234^xyz6789^rdwtest"<br>
><br>
> if: z co "^" and z ne ""<br>
> then: p(3,.0)=instr(z,"^");la=mid(z,<wbr>"1",p-"1");n=n+"1";specval(n)=<wbr>la;la="";mid(z,"1",p)="";z=""{<wbr>z{""<br>
><br>
> if: not(z co "^") and z ne ""<br>
> then: n=n+"1";specval(n)=z;goto done<br>
><br>
> Now z eq "xyz6789^rdwtest".<br>
><br>
> if z eq "" or n eq "20", I stop. If not I just loop back and do it again.<br>
><br>
> Once I am done this I then can write the loop to read specval array<br>
> into what ever I want.<br>
><br>
> Hope this helps,<br>
><br>
> Richard D. Williams<br>
><br>
> On 1/15/2018 4:20 PM, scooter6--- via Filepro-list wrote:<br>
> >I have a pipe delimited file that I'm looking to import<br>
> >It does however contain 4-5 fields that have ^ in them which denotes there<br>
> >are multiple items of data in a single field....<br>
> >Is there a way to pull the specific field of an import and put it in an<br>
> >array to pair with the filed after it...<br>
> ><br>
> >For example, a field has abc1234^xyz6789 (so this field contains<br>
> >2 pieces of information<br>
> >The very next field has filename.pdf^filename2.pdf (so this field<br>
> >also contains 2 pieces of information)<br>
> ><br>
> >My filePro file has fields called set1, set1-file, set2, set2-file,<br>
> >etc.....<br>
> >I want to be able to assign abc1234 to the field called set1 and<br>
> >filename.pdf to set1-file; and assign xyz6789 to set2 and filename2.pdf to<br>
> >set2-file<br>
> ><br>
> >Is there a way to pull a field into an array and declare a character (in<br>
> >this case, the ^ ) as a sepator for the array....or is there even a simpler<br>
> >way to do this without doing a bunch of mid statements, etc?<br>
> ><br>
> >thanks<br>
> ><br>
> >Scott<br>
> >-------------- next part --------------<br>
> >An HTML attachment was scrubbed...<br>
> >URL: <<a href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20180115/03f78196/attachment.html" target="_blank" rel="noreferrer">http://mailman.celestial.com/<wbr>pipermail/filepro-list/<wbr>attachments/20180115/03f78196/<wbr>attachment.html</a>><br>
> >_____________________________<wbr>__________________<br>
> >Filepro-list mailing list<br>
> ><a href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.<wbr>com</a><br>
> >Subscribe/Unsubscribe/<wbr>Subscription Changes<br>
> ><a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank" rel="noreferrer">http://mailman.celestial.com/<wbr>mailman/listinfo/filepro-list</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> >---<br>
> >This email has been checked for viruses by AVG.<br>
> ><a href="http://www.avg.com" target="_blank" rel="noreferrer">http://www.avg.com</a><br>
> ><br>
> ><br>
><br>
> ______________________________<wbr>_________________<br>
> Filepro-list mailing list<br>
> <a href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.<wbr>com</a><br>
> Subscribe/Unsubscribe/<wbr>Subscription Changes<br>
> <a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank" rel="noreferrer">http://mailman.celestial.com/<wbr>mailman/listinfo/filepro-list</a><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Audio panton, cogito singularis.<br>
</font></span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Filepro-list mailing list<br>
<a href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.<wbr>com</a><br>
Subscribe/Unsubscribe/<wbr>Subscription Changes<br>
<a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank" rel="noreferrer">http://mailman.celestial.com/<wbr>mailman/listinfo/filepro-list</a><br>
</div></div></blockquote></div><br></div>