Jump to content

Report Line 2, Only print if Image2 exists


Major Assett

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 ?

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...