MikeCarenter Posted March 6, 2012 Share Posted March 6, 2012 i need to do a numbering job but not normal way instead of 201 202 203 they want them stacked vertical like 2 0 1 2 0 2 2 0 3 Quote Link to comment Share on other sites More sharing options...
Alex Marshall Posted March 6, 2012 Share Posted March 6, 2012 Hello Mike, Are the numbers in a field from your data file? If so, try the following in a text Rule. JAVASCRIPT RULE TO SET VERTICAL TYPE OF A VARIABLE FIELD retstr = ""; for (i = 0; i <= Field("Numbers").length; i++) { if (Mid(Field("FName"),i,1) == " ") retstr = retstr + "<p>" else retstr = retstr + Mid(Field("Numbers"),i,1) + "<p>" } return retstr; Quote Link to comment Share on other sites More sharing options...
esmith Posted March 6, 2012 Share Posted March 6, 2012 One number per record? return Field("number").split("").join("<br />"); If you have a series of numbers, you could stick the code inside a FOR loop and insert paragraph tags between each. Quote Link to comment Share on other sites More sharing options...
MikeCarenter Posted March 6, 2012 Author Share Posted March 6, 2012 thanks got me on track retstr = ""; for (i = 0; i <= Field("Numbers").length; i++) { if (Mid(Field("numbers"),i,1) == " "){ //retstr = retstr + "\n" } else{ retstr = retstr + Mid(Field("Numbers"),i,1) + "\n" } } return retstr; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. 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.