kjacobson Posted July 27, 2009 Share Posted July 27, 2009 I know there is probably a simple answer to this, since I can't find the answer anywhere. How do I create a bulleted list with one variable. For instance, when a new paragraph is started a bullet is inserted? This is the variableThe same variable, but different paragraph Link to comment Share on other sites More sharing options...
kjacobson Posted August 6, 2009 Author Share Posted August 6, 2009 Is there no way of doing this? Link to comment Share on other sites More sharing options...
Brian F. Posted August 6, 2009 Share Posted August 6, 2009 I'm not quite sure what you are trying to do. Is the same varaible being repeated each time? Or are you trying to get a bulleted list of several variables? Have you tried creating a formatted text resource? Link to comment Share on other sites More sharing options...
esmith Posted August 11, 2009 Share Posted August 11, 2009 I never had a field with multiple "paragraphs" of text before, but I'm thinking you could pass the paragraphs from the field into an array by separating data by the hard return. Then you could concatenate the values and insert line breaks and bullets at the same time like this: //replace myField with correct field name in first line of code //remember to check "Treat returned strings as tagged text" var myArray = Field("myField").split("/n"); var myList = ""; for (x in myArray) { if (x == 0) { myList += "• " + myArray[x]; } else { myList += "<br />• " + myArray[x]; } } return myList; I'm not sure if the /n tag is inferred by the hard returns in your data or if you would need to do a find and replace in the data file to add the tag. In the latter case, you would need to remember to check the box for tagged text when assigning your input file. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.