How do I tell if an image attachement has an image attached?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I tell if an image attachement has an image attached?

khh7112
I what to set the visibility of an image attachment (named picture2) to true, if the image attachment widget "picture1" has an image attached.

if there something like exists($picture1) that I can set the visibility attribute to for picture2?


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: How do I tell if an image attachement has an image attached?

Erik Bruchez
Administrator
Something like:

normalize-space($picture1)

or:

normalize-space($picture1) != ''

should do the trick.

When an image is attached, a local URL is stored as the value of the field. If it is empty, there is no attachment. If it is not empty, there is one.

-Erik

On Wed, Mar 9, 2011 at 6:49 AM, Dr. Kevin Hunt <[hidden email]> wrote:
I what to set the visibility of an image attachment (named picture2) to true, if the image attachment widget "picture1" has an image attached.

if there something like exists($picture1) that I can set the visibility attribute to for picture2?


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: How do I tell if an image attachement has an image attached?

khh7112
Kind-of works.  If I put this (see below) on the visability for picture 2, then add a picture for both picture1 and picture2, then save it.
It returns successful save, but picture 2 is lost.
 
normalize-space($picture2) or normalize-space($picture1)

On Wed, Mar 9, 2011 at 1:19 PM, Erik Bruchez <[hidden email]> wrote:
Something like:

normalize-space($picture1)

or:

normalize-space($picture1) != ''

should do the trick.

When an image is attached, a local URL is stored as the value of the field. If it is empty, there is no attachment. If it is not empty, there is one.

-Erik

On Wed, Mar 9, 2011 at 6:49 AM, Dr. Kevin Hunt <[hidden email]> wrote:
I what to set the visibility of an image attachment (named picture2) to true, if the image attachment widget "picture1" has an image attached.

if there something like exists($picture1) that I can set the visibility attribute to for picture2?


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws