petermontague1

Default result in an if calculation

Discussion created by petermontague1 on Nov 8, 2012
Latest reply on Nov 8, 2012 by petermontague1

I want to avoid downloading a blank .gif because it replaces photos I have taken of my books. But I want to be able to download the photos if they are available. So I set up this if calculation: the first parameter works out for me returning me a blank when I get this .gif. But it is not returning the default result. I don't know why.

Any ideas?

 

If ( Let ( [ T = this::Child Source Code ;

end = Position ( T ; "id="original-main-image"" ; 1 ; 1 ) ;

start = Position ( T ; "<img src="" ; end ; -1 )

];

Trim ( Middle ( T ; start + 10 ; end - start - 25 ) )

) &

Parse ( this::Child Source Code ; "registerImage("original_image", "" ; "","<a href="+'"'+"" ; 1 ) = "http://g-ecx.images-amazon.com/images/G/02/nav2/dp/no-image-no-ciu._V192200227_AA300_.gif"

;

""

;

If ( Let ( [ T = this::Child Source Code ;

end = Position ( T ; "id="original-main-image"" ; 1 ; 1 ) ;

start = Position ( T ; "<img src="" ; end ; -1 )

];

Trim ( Middle ( T ; start + 10 ; end - start - 25 ) )

) &

Parse ( this::Child Source Code ; "registerImage("original_image", "" ; "","<a href="+'"'+"" ; 1 ) )

Outcomes