Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nice order to create
Message
From
18/03/2016 08:06:27
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
18/03/2016 07:56:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01633318
Message ID:
01633344
Views:
49
On guessing - and knowing what customer is doing.

I will do something on creating the CA that will determine the my numbers of items in a group, add 2 and will span to that. Those numbers or item numbers, I think more then 999 is not very likely, and I think too that nobody will use this interface to enter data with two magnitudes more then existing. So if I start I will asume group length 1 plus additonal 2 = 3 this means user can enter up to 999 or XXX items. The items are not random, they come in order. So all that will happen is that they go from 9 to 10 or so, 2 character more is more then they will ever do.

I will post the final solution later.

>That's true, with grouping it is not possible with a single expression. But even with an UDF I don't think it's trivial, but may be proven wrong. If I understand it correctly, it would be easy to sort all items, after they are fetched, but it will be hard to generate a string that can handle all incoming new items without being able to formally segment the length of each possible group (like the one-liner I proposed does for just one-group-and-ignore-the-others).
>
>Curious about how you will solve this...
>
>>If I use
>>
>>TEXT TO lcx NOSHOW  
>>1
>>10
>>2
>>03
>>1.1
>>12.R
>>1.1.R
>>1201.1.RBX.250.R.1
>>1201.1.R.250.R.1
>>1201.1.RBX.1.R.1
>>1.R
>>1.R.1
>>A
>>B
>>AA
>>5.R
>>CDXB
>>ENDTEXT &&lcx 
>><pre>
>>
>>It will fail on the RBX;R;RRBX. The problem ist that a generic number of <i>dot+something groups</i> is hard without some loop.
>>
>>I think I will mix your code with the function approach.
>>
>>Thank you (_ _)
>>
>>
>>><PRE>
>>>INDEX ON PADL(IIF(ISDIGIT(LEFT(ALLTRIM(item),1)),TRANSFORM(VAL(STREXTRACT(ALLTRIM(item),"",".",1,2)),"@L " + REPLICATE("9",LEN(item))),ALLTRIM(item)),LEN(item),"@") TAG anIndex
>>>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform