December 5, 201510 yr Hello forum. I'm having a little trouble parsing a QR Code. The problem is the length isn't always the same, but the letters used to separate the data are consistent. In this example, how would I extract the value of 10.0 which is between the C and the H. I guess what I'm trying to figure out in words is (not so simply for me); "Take the value between C and H and put it in the calculation for the field CO2'. After that, parsing the rest would be similar. I'm ok with the parsing with Left, Middle, Right, and using Position, but I cant figure out how to get the result of the varying length between any 2 letters (C & H) in this case. I've seen examples of using something similar by nesting these functions together, but that's a little beyond my basic understanding. Here's the QR code: 00102459A1205150110B0C10.0H00D0E76.1F51.8G7.5I60.6J681K-0.03 And here's the break down of code on the left, and the fields I would parse them into: 0010:24:59A TIME (A for AM, P for PM) 1205150110 DATE B0 CO C10.1 CO2 H00 Not used D0 COAF E76.1 Eff F51.8 EA G7.5 O2 I60.6 TAir J681 TStk K-0.03 Pre This is what I came up with, just didn't know if this was correct, or if there is a better way(didn't test it on all fields yet): Let([ @start=Position(TestResults::Result;"c";1;1)+1; @end=Position(TestResults::Result;"h";1;1); @length=@end-@start ]; Middle(TestResults::Result;@start;@length) ) Any help or guidance to point me in the right direction is greatly appreciated. Thanks Steve PS, I'm willing to bet one frequent helper on this site will rattle this off like childs play....
December 5, 201510 yr 46 minutes ago, Steve Martino said: Any help or guidance to point me in the right direction is greatly appreciated. Your approach is the right direction.
December 5, 201510 yr 32 minutes ago, Steve Martino said: And why are you here on a Saturday? Why not? I don't work here.
December 5, 201510 yr Dang...you mean we aren't getting paid for this? I need to speak to the Administrator!!! 1 hour ago, comment said: Why not? I don't work here.
December 5, 201510 yr 16 minutes ago, Josh Ormond said: Dang...you mean we aren't getting paid for this? You would have more credibility if you had waited till Monday morning to post this...
December 6, 201510 yr You're on the right track. There are also many custom functions either to use or to look at for inspiration. This is the one I use.
Create an account or sign in to comment