Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace !empty(alias.field) with len(alias.field)>0
Message
From
14/02/2016 15:46:04
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01631431
Message ID:
01631439
Views:
51
>>Perhaps this will do, then:
>>
>>m.lcInput = "Mytable.FieldXyx = '233' and (MyTable.Field233 > 344) and !empty(mytable.myfield) and someothertable.field3 = '333'"
>>m.lcHold = STREXTRACT(m.lcInput,"!empty(",")",1,5)
>>m.lcOutput = STRTRAN(m.lcInput, m.lcHold, "LEN" + STREXTRACT(m.lcHold,"(",")",1,4) + ">0")
>>
>
>Perfect. Thank you very much.

You're welcome.

Just remember that if "!empty()" may occur more than once, then you'll have to consider insert a DO WHILE loop until the function is completely replaced in the expression.
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform