Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What to use instead of Tag()
Message
From
09/04/2008 10:56:34
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01309311
Message ID:
01309354
Views:
6
>>>>>I have a segment of code that before calling SEEK() it checks if the current index tag is of character type. So what I do is the following:
>>>>>
>>>>>
>>>>>if type(tag()) = "C"
>>>>>   SEEK("something")
>>>>>endif
>>>>>
>>>>>
>>>>>An issue I ran into is when the index key is something like
>>>>>UPPER(SUBSTR(myfield,1,20)), the type(tag()) returns "U". I can change the code above to check that the Type(tag()) is not "L" or "N" and then call SEEK(). But I am thinking that perhaps there is a better approach.
>>>>>
>>>>>If you can suggest something alternative, I would appreciate it.
>>>>
>>>>If you want to check for the type of index key expression then you could use:
>>>>VARTYPE(EVALUATE(KEY()))
>>>
>>>Ed, Thank you very much! This works. Sorry that I gave Naomi the solution stars, I didn't notice your message first, and you were first. I owe you some stars then <g>.
>>
>>Frankly, I would prefer something more material :).
>
>Ok. Next time I am in NYC, we can do lunch, I am inviting.

Thank you, sir.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform