Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test for ! empty fails
Message
 
 
To
18/08/2016 12:08:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01639633
Message ID:
01639639
Views:
81
May be the problem in the order of evaluation in the replace command?

When I do the following:
BROWSE NORMAL FOR EMPTY(dc_crdno)
IF NOT thisform.NoCCMask
	replace dc_crdno WITH REPLICATE("*",12) + RIGHT(ALLTRIM(dc_crdno),4) ;
	FOR NOT EMPTY(trim(dc_crdno, CHR(0), chr(9), chr(10), chr(13), chr(32), chr(160)))
endif
I see the empty rows just fine. However, I still end up with the 12 * for empty rows. What should be the correct code?

I'll try replace all and IIF instead.

Thanks.

UPDATE. This didn't work either
replace dc_crdno WITH IIF(EMPTY(dc_crdno), '', REPLICATE("*",12) + RIGHT(ALLTRIM(dc_crdno),4)) all
I give up.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform