View Full Version : I don't understand this error message...

August 9th, 2012, 03:32 AM
I'm doing the exercices in the "FusionPro VDP Creator Rules Guide" and I have a problem with the "Employee ID badges" page 104.
When I try to validate the rule that "call" the images, I get this message on the first line (Pic = CreateResource(Field("Last") + ".jpg", graphic) ;) "ReferenceError: graphic is not defined"
I don't understand as I have entered the line exactly as it is in the manual (except that I have .jpg files instead of .tif)
As I'm "junior" in JavaScript, can someone tell me why I do have this error ?

you can see a screen capture here : (http://http://gerardteillot.com/errorpict.jpg)
problem with the link ! the right is : http://gerardteillot.com/errorpict.jpg
Thank you for your help !

Dan Korn
August 9th, 2012, 09:03 AM
You need quotes around "graphic". The function takes a string; you're passing it a variable named graphic instead. Try this:
Pic = CreateResource(Field("Last") + ".jpg", "graphic");

August 10th, 2012, 12:37 AM
Thank you Dan, it works perfectly !
page 106 of my Rules guide, the line is corectly typed but jus below, in the screen capture, the quotes are missing. Guess wich of the two lines I was silly copying…