Ignore 0 Data Field From Excel Follow

0
Avatar
Legacy Poster

hello

i have excel file with list of people and address.

the address is split to address,num,apt, pob,,,,,,in the apartment colume whenever there is no real data there is 0 value/

 

in the advance data source, i add 1 sub-string with data-screen call "apt.", so the word apt. apeare whenever there is a value in this colum.

i checked the "suppress if the -next - sub-srting is empty.

and then i add the apt. data field.

 

but beacuse there is a 0, its printing  the "apt." word all the time like this "apt. 0"

i need to ignore 0 value.

how can i vb this on the vb script assistant

please help :(

7 comments

0
Avatar
Legacy Poster
Comment actions Permalink

please help :(

0
Avatar
Michael Toupin (mtoupin
Comment actions Permalink

The easiest way to achieve that would be an OnProcess VB script that says:

 

If value = "0" than value = ""

 

Just select the VB scripting tab, enable it, hit 'edit', then replace the data in the 'Script for OnProcessData event' with the script above.

0
Avatar
Legacy Poster
Comment actions Permalink

i already wrote that it return that error:

the following script error was found:

OnProcessData(Line1): If Value = "0" Then Value = "" :Expected 'Then'

0
Avatar
Legacy Poster
Comment actions Permalink

thanx for the quick answer

i recive that error:

the following script error was found:

OnProcessData(Line1): If Value = "0" Then Value = "" :Expected 'Then'

0
Avatar
Legacy Poster
Comment actions Permalink

please can someone help :(

0
Avatar
Canguita
Comment actions Permalink

Hello Bekosh,

 

Please can you copy and paste the complete code for your VBscript?

 

Thanks

0
Avatar
Legacy Poster
Comment actions Permalink

many thanx for reply :)

If value = "0" than value = ""

 

this is the complete code

Please sign in to leave a comment.