Default Image Follow

0
Avatar
Legacy Poster

New to Bartender. Currently evaluating as a replacement for current product. Using Bartender Automation Edition v 10.

I am trying to create Shelf tags with product image. I need to place a default image if the unitUPC field does not find a match for upc.jpg in my default image folder.

 

4 comments

0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

Hi kevinha1,

 

Do you mean you have a data sourced picture which file name is coming from database field,

and if there's no such file in a folder, show a default picture?

 

There should be more suitable method to do that - 

however one idea is place the default picture below the data sourced picture. 

Set the picture's error handling to [Never abort print job] to avoid error message.

 

So if the data sourced picture is not shown, the default picture appears. 

only works if default picture's size is the same or smaller than the data sourced pictures.

0
Avatar
Legacy Poster
Comment actions Permalink

Thank You for you reply. This method is how I am testing it now. It does work but there should be a better way.

0
Avatar
Legacy Poster
Comment actions Permalink

After further testing this is not a valid option. many of the item images are smaller than the default image. I need a way to place default image only if the item image is missing.

0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

Try this..

Create a picture as data source, get database value from database field, then give share name to data source (ex. PICPATH)

Create another (default) picture, set value as default picture file. In datasource's transform, add VB Script  - if picture file is exists, change data source to empty.

 

'hide this picture when file PICPATH in "c:\pic" exists
Set fso = CreateObject("Scripting.FileSystemObject")
'Named datasource PICPATH have filename of another picture.
path = "c:\pic\" & PICPATH

'If the file exists, this picture shows nothing. 
If fso.FileExists(path) = True Then
   Value = ""
End If
Set objFileSys = Nothing

Please sign in to leave a comment.