Jump to content
Major Assett

Report Line 2, Only print if Image2 exists

Recommended Posts

I'm trying to create an Assset report where the second line contains Asset.image2.

I want to only print the second line if the Asset.image2 has a value (ie. has a picture added to the asset).

Obviously making the line appear (or not) should be a simple matter of applying a formula to decide if the picture exists or not, however most functions complain about a picture type because they expecting a string and not a picture.

Currently I am thinking about adding a user field called something like "picture 2 added" and printing line 2 if that is true .... but it is a bit of a pain to fill in this new field for around 50% of my assets.

Anyone know a better way, or how to do this properly using the picture fields ?

Share this post


Link to post
Share on other sites

Hi, there are 2 functions:

Asset.GetNumImages - returns number of images that an asset has attached

Asset.HasImage - returns TRUE if the asset has at least 1 image attached to it.

would these functions help you out?

Share this post


Link to post
Share on other sites

So I can't use Asset.GetNumImages as it always returns zero ... but I found a simple way which works for me;

 

Use the function DrawingHeightSCM(Assset.Image2)  ... it returns a zero value if there is no image and a non-zero value if the image exists - don't know why I didn't find this before.

So now I have a formula to print line 2 ...  DrawingHeightSCM(Asset.Image2) > 0

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...