Craig,

  Try the following code, I have not tested it myself, but it should lead you 
in the right direction. Also, it may help if you use the Trim function for your 
field names (as I applied below). Databases have a tendency to sometimes have 
an extra space at the beginning or end which could cause the field name to not 
match up with your resource name. The Trim function will eliminate any extra 
spaces. Try the following in an empty graphic rule:

if (Resource(Trim(Field("Name"))).exists)
  return Resource("LastName.JPG");
else
  return Resource("default.jpg");


Hope that helps.
-Lauren


-----Original Message-----
From: Craig Daters [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2008 11:32 AM
To: FusionPro Users Forum
Subject: [fusionpro] Check for the existence of a Resource


I have a huge database that has a column of filenames for pictures (i.e.,
"Lastname.jpg" except where there are duplicate last names, then it is
LastnameFirstname.jpg) for every record.

I have loaded all of the provided photos into FusionPro as graphic
Resources. However, despite having a filename listed in the db field not all
records actually have a picture.

I am looking to create a rule for my Picture that checks to see if there is
actually a Resource available and inserts a default logo image if not.

Something like

if (Resource(Field("Picture")) doesn't exist)
        return Resource("DefaultLogo.jpg")
else
        return Resource(Field("Picture"));

Can someone please help me, I am pulling my hair out! :)

Craig D. 


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!


Variable text on a curve and soft drop-shadows for variable text


LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade

New licenses available for $599 each at:
http://fusionpro.printable.com/store/

All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED] 
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!


Variable text on a curve and soft drop-shadows for variable text


LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade

New licenses available for $599 each at:
http://fusionpro.printable.com/store/

All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to