Ben, That's perfect, and kind of what I'd said in one of my previous, although not as succinctly or as well explained. Thanks for this as a way of confirming an idea. (I tend to use {{table}} as my replacement strings. It goes back to my coding back in the 80s/90s)
I've put the projects to one side as it was only a 'could you just' request from one of the team and only helps us view it a bit easier. I have bigger fish to fry at the moment. But I'll revisit the thread when I've done it and post the 'solution' for others to use. Thanks again. Sean *Pi Digital * On Thu, 9 Sept 2021 at 14:23, Ben Rubinstein via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Sean, > > Not to wind you up with yet another 'helpful' suggestion... but here's > what I > would do, if I've understood you correctly. > > I think you're formatting a nice message in a field using LC styling; then > using the Mime Encoder feature to format it to include in an email. But > when > you try to put a table in the field, it doesn't come out nicely. > > My suggestion would to be do that, but where you want the table in the > field, > just put "***TABLE***" or similar. > > Then do the minimal work to generate the table in HTML format, and insert > in > the result of the mime encoder, so you end up doing something like > > put mimeEncodeFieldAsMIMEMultipartDocument(pField) into > tMessageBody > replace "***TABLE***" with tHTMLtable in tMessageBody > > Let the MIME encoder do all the dirty work it does on the messy stuff. Do > the > straightforward rendering of a table in HTML yourself. Combine the two. > > My 2c. Apologies if this a lecture on sucking eggs. > > Ben > > > On 09/09/2021 09:35, Pi Digital via use-livecode wrote: > > Hehe. Full of ‘solutions’ :) > > > > It’s because we need to see it as a table in an email :D > > That’s the point of the question. > > > > Here’s my full process if it helps you understand. > > > > I (that is to say, a server I code and manage) process around 100-120 > emails a day from the mobile (cell phone) carriers O2 and EE. They all get > done at about 5am every day at including weekends. Some have call data in > them and some do not. Some have broken csv’s in them. Myself and others in > the team need to quickly know when it breaks so we can look into it. > > > > So, to be absolutely sure, we email ourselves every morning a list of > which emails have been processed for all of the clients (4 so far). It has > the details of the email UID, the customer name, the client(or Dealer as we > call them) name, the date range, the account number, number of Kb, and a > bunch of other relevant data to us. This list has grown. Each line has a of > course a different length and does not format out like the table it is put > into in LC. > > > > The purpose of the email is a forceful reminder to us to check. The > subject let’s us know immediately if there may be issues by telling us how > many got processed and how many had data and how many are potentially > broken. These can only be indicators. We find ourselves in the rubbish > position of checking it over by eye. > > > > We ‘could’ have it sent to a database, or show up in an app or all > manner of other methods but by far and away the simplest way for us to > daily get this reminder is by a simple email with a heading and a list. > Email is a system with a long track record of ‘working’. The fact that > email still exists is testament to this. A quick scan over this daily doc > helps us quickly see which ones we’ve already checked, what potential > issues there are and, more importantly for me, if the remote server had > completely fallen over. No need to open any links or other software to view > quickly a stream of data. It’s easier to recall and delete than our mySQL > database. Email is just there, always. > > > > So, the ability to quickly convert our little table from a text field on > the server into the body of an email is what I’m looking to do. I had > expected the mime field encoder to do this but it seems it’s only very > simple in its view of a field. > > > > The data returned from ‘the htmlText of field’ is so long and convoluted > and also does not contain either the correct formatting or table info > suitable for email. > > > > So, it looks like if I have to do it I will have to code a whole html > method for expressing it as a table in an email body that email will accept > and display as expected. That’s why I had ‘hoped’ that the MIME encoder > already did it for us. Alas, negatory! > > > > I didn’t want to have to have put all this into an email when asking the > question and ‘hoped’ that a simple question would suffice to get a simple > answer (which MarkW was gracious to provide from the most qualified > position I know). > > > > But, seriously, thank you for your interest and attempts to offer useful > suggestions. Sometimes what sounds like a simple answer actually just > overcomplicates the ‘end user experience’. Something we as software > engineers should be ever aware of ;) > > > > Thanks again > > > > Sean > > Pi Digital > > > > > >> On 9 Sep 2021, at 05:29, Rick Harrison via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> > >> Hi Sean, > >> > >> Why don’t you just email them a spreadsheet or a .csv file, > >> let them open it. and they can copy and paste whatever they want > >> into their own spreadsheet ? > >> > >> Rick > >> > >> > >>> On Sep 8, 2021, at 10:43 PM, Pi Digital via use-livecode < > use-livecode@lists.runrev.com> wrote: > >>> > >>> Hi Rick > >>> > >>> Because, as stated before, you can’t select the text and paste it into > a spreadsheet. > >>> > >>> Thanks though. > >>> > >>> Sean > >> > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode@lists.runrev.com > >> Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > >> http://lists.runrev.com/mailman/listinfo/use-livecode > > _______________________________________________ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode