Major Assett Posted October 13, 2017 Report Share Posted October 13, 2017 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 ? Quote Link to comment Share on other sites More sharing options...
admin Posted October 13, 2017 Report Share Posted October 13, 2017 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? Quote Link to comment Share on other sites More sharing options...
Major Assett Posted October 23, 2017 Author Report Share Posted October 23, 2017 Brilliant ... Thanks - Asset.GetNumImages is the way for me ... All assets have image1, only a few have image 2 so condition Asset.GetNumImages > 1 is perfect. Quote Link to comment Share on other sites More sharing options...
Major Assett Posted October 23, 2017 Author Report Share Posted October 23, 2017 Oh ... errr !! Except Asset.GetNumImages always seems to return 0. As a test I did a quick report to display images and also the value of Asset.GetImages ... in all cases (running type "preview") the value of Asset.GetNumImages was 0 :-( Quote Link to comment Share on other sites More sharing options...
Major Assett Posted October 24, 2017 Author Report Share Posted October 24, 2017 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 Quote Link to comment Share on other sites More sharing options...
admin Posted October 24, 2017 Report Share Posted October 24, 2017 Hi, we will take a look at this and issue a free update soon if we can reproduce the error. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.