Re: Most streamlined method to get data

2021-08-02 Thread Skip Kimpel via use-livecode
This is why you have to love this group.. never knew that the code csvToText existed. It worked like a charm!!! Thank you so much everybody for your help with this puzzle! SKIP On Sun, Aug 1, 2021 at 7:39 PM Alex Tweedly via use-livecode < use-livecode@lists.runrev.com> wrote: > It looks

Re: Most streamlined method to get data

2021-08-01 Thread Alex Tweedly via use-livecode
It looks like all the "thousand dollar+" amounts are quoted - i.e. it's an example of a regular CSV file - ugly but predictable. Did you try the CSVToTab converter ? https://github.com/macMikey/csvToText Alex. On 01/08/2021 20:39, Skip Kimpel via

Re: Most streamlined method to get data

2021-08-01 Thread Mark Wieder via use-livecode
On 8/1/21 12:39 PM, Skip Kimpel wrote: So to give you a full sense of the ugliness of the CSV I am working Urk. Any chance of getting the csv delivered to you as tab-separated instead of comma-separated? That would at least take some of the burden away. -- Mark Wieder ahsoftw...@gmail.com

Re: Most streamlined method to get data

2021-08-01 Thread Tom Glod via use-livecode
yikes. You probably did the same thing, but whenever I deal with this kind of scenario, I always work first to gain control of the delimiter without losing any data, So I set the rules of processing accordingly. Then when I know I have correctly changed the item delimiter, only then do I try to

Re: Most streamlined method to get data

2021-08-01 Thread Skip Kimpel via use-livecode
So to give you a full sense of the ugliness of the CSV I am working with, here it is: (trying to add certain columns but because some columns have multiple "thousand dollar+ amounts, it throws doing an item count. Need to get rid of all dollar signs (easy) and all the commas that are part of a

Re: Most streamlined method to get data

2021-07-30 Thread J. Landman Gay via use-livecode
Trueword reads text as we do, ignoring most punctuation. LC's word definition does not do that except for instances of white space and words within quotes. Since there are no spaces in the last line of the example, the whole line is a word. -- Jacqueline Landman Gay | jac...@hyperactivesw.com

Re: Most streamlined method to get data

2021-07-30 Thread Mark Smith via use-livecode
Newman via use-livecode > Date: Thursday, 29 July 2021 at 13:56 > To: How to use LiveCode > Cc: Craig Newman > Subject: Re: Most streamlined method to get data > Ugh. I really do not like the format of the use-list. > > Anyway, don’t just replace comma with empty.

Re: Most streamlined method to get data

2021-07-29 Thread Jean-Jacques Wagner via use-livecode
Hi put replacetext(varlist,quote,numtochar(29)) into varlist2 set the itemdelimiter to numtochar(29) go each second item numtochar(29) to extract the komma or do whatever wirth it which does not interfer with other char the comma to another char put replacetext (valist2,numtochar(29),quote) into

Re: Most streamlined method to get data

2021-07-29 Thread Mark Wieder via use-livecode
On 7/29/21 9:24 AM, Ben Rubinstein via use-livecode wrote: As grepophile, I'd go for some variation on While I heartily approve of Ben's use of grep, here's another approach using an array. Note that is somewhat specific to your data set, and from the looks of the data my guess is that

Re: Most streamlined method to get data

2021-07-29 Thread Ben Rubinstein via use-livecode
As grepophile, I'd go for some variation on get matchText(last line of myVar, \ ",+Total,.*\"\$(\d*,?\d+\.\d\d)\",+", \ myTotal) obviously details depend on what variations you expect within the data. Note that there's a nasty aspect of LC parsing: in

Re: Most streamlined method to get data

2021-07-29 Thread Craig Newman via use-livecode
"Nice solution Colin!” Agreed. Have to get down with these fancy new gadgets. Craig > On Jul 29, 2021, at 10:22 AM, Rick Harrison via use-livecode > wrote: > > Nice solution Colin! ___ use-livecode mailing list use-livecode@lists.runrev.com Please

Re: Most streamlined method to get data

2021-07-29 Thread Rick Harrison via use-livecode
Nice solution Colin! Rick > On Jul 29, 2021, at 9:10 AM, Colin Kelly via use-livecode > wrote: > > Put the last trueword of yourVariable ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and

Re: Most streamlined method to get data

2021-07-29 Thread Colin Kelly via use-livecode
Put the last trueword of yourVariable That should do what you need ☺ Col. From: use-livecode on behalf of Craig Newman via use-livecode Date: Thursday, 29 July 2021 at 13:56 To: How to use LiveCode Cc: Craig Newman Subject: Re: Most streamlined method to get data Ugh. I really do not like

Re: Most streamlined method to get data

2021-07-29 Thread Craig Newman via use-livecode
Ugh. I really do not like the format of the use-list. Anyway, don’t just replace comma with empty. Do it to the trailing commas only. This can be done in several ways. Craig > On Jul 29, 2021, at 8:42 AM, Skip Kimpel via use-livecode > wrote: > > I have a variable that contains: > >

Re: Most streamlined method to get data

2021-07-29 Thread Craig Newman via use-livecode
Looking at this again, two seconds later, you may also want to; replace comma with empty in eureka Craig > On Jul 29, 2021, at 8:42 AM, Skip Kimpel via use-livecode > wrote: > > I have a variable that contains: > > ,Name,,,Quantity,Total,,,Percent > > ,Dine

Re: Most streamlined method to get data

2021-07-29 Thread Craig Newman via use-livecode
Hi. I s the value you want always in the last line? If so, that dollar sign is always in a place that can be referenced: set the itemDel to “$” put the last item of the last line of yourCommaInfestedData into eureka replace quote with empty in eureka Craig > On Jul 29, 2021, at 8:42 AM, Skip

Most streamlined method to get data

2021-07-29 Thread Skip Kimpel via use-livecode
I have a variable that contains: ,Name,,,Quantity,Total,,,Percent ,Dine In,,,189,"$4,812.71",,,57.96% ,Take Out,,,72,"$1,676.43",,,20.19% ,3rd Party,,,54,"$1,779.35",,,21.43% ,Bakery,,,3,$34.83,,,0.42% ,Total,,,318,"$8,303.32",,, What is the best way to get 8303.32