Simplicty and flexibility!


New Function in 8 - MemoDecodePair() - Function to return the value from a encoded pair in Memo (Ver. 8.0.0.11.40)

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

New Function in 8 - MemoDecodePair() - Function to return the value from a encoded pair in Memo (Ver. 8.0.0.11.40)

This might be "greek" for the ones of you that hasn't followed us through the new MemoClass/WebField class project, but for those that have, this will be the last clue to the riddle. Over the last couple of months, you have been able to see Memo transferred from something to be avoided, to one of the most important features in "modern" DataEase. We now use it for saving Web Pages, Building reports, building exports etc etc, and last but not least Importing Data with MemoReadFromFile... MemoReadFromFile is brilliant to read info back into a memo field so it can be displayed with WebField (Advanced Webfield) further edited with HTMLEdit or simply printed with PrintMemo(), but one thing have been missing... What if there is information in there that I want to extract? Obviously there is functions like MemoFind, that you can use to find a occurrence, but what about extracting information? This has been a little headache, because how do you limit or tell DataEase what to extract? We have stole a little from DG3, and we have stole a little from how things are transmitted on the web, and we have come up with MemoDecodePair() This function will need the data to have been encoded in a certain format as a pair. [@variablename:value@] ex. [@customername:DataEase International Ltd@] MemoDecodePair(MemoToScan,"customername") will then return DataEase International Ltd. The return value of MemoDecodePair is string(256). So is this useful to me? We have simply shown a simple extraction, but this can of course be manipulated programatically using all the other DataEase function, so you can unwind a lot of information in a DQL for instance by adding a sequence number to the variablename, and saving a record for each turn of the wheel... Use your imagination...we create the functionality, it is your job to exploit it and break it ;-)
Written by DataEase 04/10/12 at 08:39:54 Dataease [{8}]FIVE