<div dir="ltr"><div>I'm sure there is an easier way - but in interest of time - I wrote a loop to go check with field was next empty one and assigned a count number</div><div>Then based on number returned am populating record accordingly</div><div>It works so....on to the next thing for now </div><div>I may revisit it later when I get more time</div><div>thanks to all who replied</div><div><br></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Fri, Nov 1, 2019 at 10:50 AM <a href="mailto:scooter6@gmail.com">scooter6@gmail.com</a> <<a href="mailto:scooter6@gmail.com">scooter6@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>I think my problem will be that the charges aren't necessarily in order</div><div>So, I could get:</div><div><br></div><div>Charges|327|Paint|100.00</div><div>Charges|455|Carpet|150.00</div><div>Charges|455|Plumbing|300.00</div><div>Charges|327|Electric|75.00</div><div><br></div><div>So, it would lookup the first line using 327 as the key, look at that record which could have 2 charges in it already - and this one now needs to be added as charge 3</div><div>Then it will lookup the second line using 455 as the key (so it's on a different record now) and that one may not have any charges on it yet, so this one needs to added as charge 1...and so on</div><div><br></div><div>So if that's the case, will loading an associated fields array work when it chooses the specific record and 'count' (or can code make it count) how many fields are empty?  That's where my confusion sets in - I've never done @AF and doing F10 in processing and search for @AF there isn't an example shown there</div><div>Guess I'll take a look at the online manual</div><div><br></div><div>work in progress....</div><div><br></div><div>thanks all</div><div><br></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Oct 31, 2019 at 6:17 PM James Flanagan <<a href="mailto:James@flantec.com" target="_blank">James@flantec.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div>Are the 40 fields defined as an array?  If so, (assuming that they are defined as fields 61-100)<div><br></div><div><br></div><div>Dim chg(40)^61</div><div><br></div><div>ct=“1”</div><div>loop::’:</div><div>:chg(ct) ne “”:ct=ct+”1”;goto loop:</div><div>::chg(ct)=(imported data)</div><div><br></div><div>Make sense?<br><div>
<div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><br><br>James Flanagan</div><div style="margin:0px;color:rgb(0,106,227);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="text-decoration:underline"><a href="http://Flantec.com/" target="_blank">Flantec.com</a></span></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal;min-height:14px"><br></div><div style="margin:0px;color:rgb(0,106,227);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="color:rgb(121,121,121)">email:<span style="white-space:pre-wrap">        </span><a href="mailto:James@Flantec.com" target="_blank"><span style="color:rgb(0,106,227)">James@Flantec.com</span></a></span></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal">mobile:<span style="white-space:pre-wrap"> </span>760-458-8498</div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal">home: <span style="white-space:pre-wrap">  </span>219-221-6219</div><div style="margin:0px;color:rgb(0,106,227);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="color:rgb(121,121,121)">text:<span style="white-space:pre-wrap">         </span><a href="mailto:7604588498@txt.att.net" target="_blank"><span style="color:rgb(0,106,227)">7604588498@txt.att.net</span></a></span></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal;min-height:14px"><br></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal">Skype:<span style="white-space:pre-wrap">   </span>Flantec</div><div style="margin:0px;color:rgb(0,106,227);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="color:rgb(121,121,121)">ichat:<span style="white-space:pre-wrap">     </span><span style="color:rgb(0,106,227)"><a href="mailto:James@Flantec.com" target="_blank">James@Flantec.com</a><span style="white-space:pre-wrap">     </span></span></span></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal;min-height:14px"><br></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal">home:<span style="white-space:pre-wrap"> </span>1901 Cidermill Road</div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="white-space:pre-wrap">          </span>Michigan City, IN 46360</div><span style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><br></span><span><img id="gmail-m_749372463981285386gmail-m_-880247723168697360574054861-4BB5-4304-BAEE-5DE6B7705416" src="cid:16e276c4de98ef2ec81"></span>
</div>
<div><br><blockquote type="cite"><div>On Oct 31, 2019, at 4:59 PM, <a href="mailto:scooter6@gmail.com" target="_blank">scooter6@gmail.com</a> wrote:</div><br><div><div dir="ltr"><div>Sample.csv</div><div><br></div><div>Charges|327|Paint|2019-10-25|100.00</div><div>Charges|327|Carpet|2019-10-23|650.00</div><div>Charges|526|Bathtub|2019-10-21|175.00</div><div><br></div><div>Each line that starts with 'Charges|' will lookup record based on 2nd field</div><div><br></div><div>When it finds that record, that record can have 40 different fields to put the details of these charges</div><div><br></div><div>I want to know simplest way to find the first of those 40 different fields that is blank and put the charges detail in that and then goto loop</div><div><br></div><div>Hope that helps clarify</div><div><br></div><div>I'll look at the @AF and ^A that you have in your import statement</div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Oct 31, 2019 at 5:29 PM James Flanagan <<a href="mailto:James@flantec.com" target="_blank">James@flantec.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div>Scott, <div><br></div><div>If I understand what you are tying to do, I have done just that.  Conditionally, set variables based upon what the line content is.  </div><div><br></div><div><br></div><div>Sample csv file</div><div><br></div><div>labor,80.00</div><div>equipment,140.00</div><div>other,20.00</div><div><br></div><div><br></div><div>Import </div><div><br></div><div>loop::’:</div><div>file=“tmp/file.csv"</div><div>::import ascii pck=(file) r=\n f=^A:</div><div>:not pck:goto ender:</div><div>:pck(1) co “labor”:lb=pck(2);goto loop:</div><div>:pck(1) co “equip”:eq=pck(2);goto loop:</div><div>:pck(1) co “other”:ot=pck(2);goto loop:</div><div><br></div><div>Please let me know if I may have misunderstood what you are trying to do.  Thank you.  </div><div><div>
<div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><br><br>James Flanagan</div><div style="margin:0px;color:rgb(0,106,227);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="text-decoration:underline"><a href="http://flantec.com/" target="_blank">Flantec.com</a></span></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal;min-height:14px"><br></div><div style="margin:0px;color:rgb(0,106,227);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="color:rgb(121,121,121)">email:<span style="white-space:pre-wrap">        </span><a href="mailto:James@Flantec.com" target="_blank"><span style="color:rgb(0,106,227)">James@Flantec.com</span></a></span></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal">mobile:<span style="white-space:pre-wrap"> </span>760-458-8498</div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal">home: <span style="white-space:pre-wrap">  </span>219-221-6219</div><div style="margin:0px;color:rgb(0,106,227);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="color:rgb(121,121,121)">text:<span style="white-space:pre-wrap">         </span><a href="mailto:7604588498@txt.att.net" target="_blank"><span style="color:rgb(0,106,227)">7604588498@txt.att.net</span></a></span></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal;min-height:14px"><br></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal">Skype:<span style="white-space:pre-wrap">   </span>Flantec</div><div style="margin:0px;color:rgb(0,106,227);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="color:rgb(121,121,121)">ichat:<span style="white-space:pre-wrap">     </span><span style="color:rgb(0,106,227)"><a href="mailto:James@Flantec.com" target="_blank">James@Flantec.com</a><span style="white-space:pre-wrap">     </span></span></span></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal;min-height:14px"><br></div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal">home:<span style="white-space:pre-wrap"> </span>1901 Cidermill Road</div><div style="margin:0px;color:rgb(121,121,121);text-transform:none;line-height:normal;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><span style="white-space:pre-wrap">          </span>Michigan City, IN 46360</div><span style="text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;word-spacing:0px;white-space:normal"><br></span><span><span id="gmail-m_749372463981285386gmail-m_-8802477231686973605cid:16e23d255a58ef2ec81"><PastedGraphic-1.tiff></span></span>
</div>
<div><br><blockquote type="cite"><div>On Oct 31, 2019, at 3:35 PM, scooter6--- via Filepro-list <<a href="mailto:filepro-list@lists.celestial.com" target="_blank">filepro-list@lists.celestial.com</a>> wrote:</div><br><div><div>I will have ongoing csv files that I need to import into a filePro database<br><br>The beginning of each line is static, in that it will say one of 4-5 things<br>- based on field 1, it goes to a different part of the import<br>There is one that will start with   'Charges|'   (it's a pipe delimited<br>file)<br>The 2nd field is used to look up the record<br><br>Each record in filePro can have up to 40 charges in it<br><br>Since the inbound csv file won't necessarily be sorted in order of field 2<br>(the key to lookup the record) - is there a simpler way to know which field<br>to put the new charge in vs having to say<br><br>if charge field 1 is not "" but charge field 2 is blank, then put this<br>charge in field 2 and so on?<br>The bottom line will be if all 40 charge fields are not empty, it will skip<br>the record (which I have that part - ) just wondering if there's an easier<br>way I'm not thinking of than to 'step' through each charge field until I<br>find the first empty one....<br><br>thanks<br>Scott<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20191031/b137ff56/attachment.html" target="_blank">http://mailman.celestial.com/pipermail/filepro-list/attachments/20191031/b137ff56/attachment.html</a>><br>_______________________________________________<br>Filepro-list mailing list<br><a href="mailto:Filepro-list@lists.celestial.com" target="_blank">Filepro-list@lists.celestial.com</a><br>Subscribe/Unsubscribe/Subscription Changes<br><a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br></div></div></blockquote></div><br></div></div></blockquote></div>
</div></blockquote></div><br></div></div></blockquote></div>
</blockquote></div>