Is this an image on the layout, or an image in a field? If it is an image on the layout then I believe you will not be able to conditionally format it in the conventional sense. I believe you will have to make it a calculation field, result type container. Have another repeated, global, field, 'ImageToShow' and in repetition 1 put the colour image and in rep 2 put the B&W image.
Then set the calculation of the image displayed to be:
If ( TestForValidURL = True ; GetRepetition (ImageToShow ; 1 ) ; GetRepetition (ImageToShow ; 2 ) )
"On my layout I want an image to show a color image if there is a URL available or a black & white image if there is not. [...] The image is a container field. I need to set the contents of the single container field on the layout, between two(2) different container images."
Why would this not work (to set the image that is a container field)?:
If ( TestForValidURL = True ; Image1 ; Image2)
"How can a global field have a repetition? I thought global storage only meant one value"
They have only one value for every record. But there is nothing to stop them having the same 20 repeated values for every record... They are often used to store image values for use in calculations like this, eg:
StatusOfSomeField = Closed ; GetRepitition ( gTrafficLightValue ; 1 ) ;
StatusOfSomeField = Pending ; GetRepitition ( gTrafficLightValue ; 2 )
StatusOfSomeField = Open ; GetRepitition ( gTrafficLightValue ; 3 ) ;
where the repetitions of gTrafficLightValue are red, amber, and green.
Wait one minute, I can't find a function called "GetRepitition". Can I get a copy of your custom function? If not then okay. I'll see if I can find one.
BTW, how do I load an image into a containers 2 repitition local?
Whoops - sorry for appalling spelling.