Start a new topic

Print Label if Data field contains data

I am trying to create bullet points in a print layout.

I'm using a label with '>' as the bullet then followed by a data field (a custom text field). 

This works fine if you have a defined number of 'bullets'

However, i have some products that have 3 bullets, but some with 5... what i'd like to do is dynamically print the bullets ONLY if the corresponding custom text field contains data.

I could use Addline() for the data fields but can i concatenate ">" as a bullet within the addline function?


i.e. 

"Key Features"+

addline(">"DocumentItems->CustomText10)+

addline(">"DocumentItems->CustomText10)


Obviously the above doesn't work, as it sees ">" as an operator... is there a way to escape this?



Could you not just put the bullet as part of the text in the field?


Also, you can't use addline in the way that you're intending - if indeed the Features are all stored in CustomText10.


In my case, I use a CustomMemo field, which allows line breaks and the bullets are already in that field when added to the quote.

Thanks for the reply Matt - not 100% on what you mean by not using Addline the way i'm intending. Presumably you mean inserting a string in to the middle of it? If that's the case then i know i can't... but it was the best way i could highlight what i was trying to do.


Anyways, you've brought up a very valid point in that i could just add the bullet to the CustomText field itself... which i completely overlooked... i guess sometimes we just get too deep in to something to see the most obvious answer :)



Ah, yes.. it was indeed a very good way of highlighting the intended output!


I'm often guilty of trying to do something clever, and often there's a much more simply answer! :)

Barry - Have you considered using some intricate if...then statements to test for an empty field (test for "" - double double quotes).  If there is a value, then output the ">" along with the text afterward?

Hi Hank...


I ended up just embedding the bullet in to the customtext fields that i'm using.

I think use Addline() to print the fields (so that it will miss out any that contain no data) and on top of that i use IF statements to only show the detail section if one or more of the customtext fields contains data. If none contain data the section doesn't print :)


I am confused. How did you embed the bullet into the CustomerMemo field? I have been trying to cut and copy a bullet from word and past it into the Memo field, but it does not work.

Sometimes it doesn't look right in the description*, but does display correctly on the layout.


*You sometimes see what looks a bit like this: "|"


Did you try previewing the layout?

I just tried copying from here and it worked nicely:

https://www.alt-codes.net/bullet_alt_codes.php



1 person likes this
Login or Signup to post a comment