Hi all,
I need some suggestions. I have a form and in it, I have a text field and a button. This button, when clicked, brings up a picklist to a database view. When I select one or more items from the picklist, it populates the selected items into the text field. What I want to do now is to have these items come up as a bullet number list (i.e. 1 2 3 …). I can’t seem to figure out a way to do this. And if possible, bullet number list the items in the order I select them.
Is this possible? If not, is there other ways to accomplish this.
Thanks in advance.
Gene
Subject: How to create bullet list in a field
Gene,You cannot put formatted text into a plain text field.
You could of course put it into a RTF but RTF’s are a bit hard to handle programmatically.
You could use the approach (which I do) that Bulleted lists are no more than numbers followed by Text. So you could Have a number field from which you take the number and a Text field from which you take (each) entry and a results (Text Multi-Value) field where you store the result.
This approach is hard to generate (create) but is easy to manage.
Regards
Rolf Pfotenhauer
Subject: RE: How to create bullet list in a field
Rolf,
Thanks for the comment. Does your approach allow reformatting of the bullet list number when the user selects different items from the picklist? At first, I was thing of create a view with the number and the text column sorted ascending on the number. Combining of this two text will result in bullet list. How, this assume the user selects all items from the picklist (or view). I am puzzled.
Gene
Subject: RE: How to create bullet list in a field
You didn’t mention anything about selection from a PickList. This makes a big difference in how you attack this problem.
So why does the list (to the Field) need to be numbered?
Regards
Rolf Pfotenhauer
Subject: RE: How to create bullet list in a field
Sorry, I thought I did in my original post. It needs to be numbered as part of the requirement.
Subject: RE: How to create bullet list in a field
Yes, I know that you said that it needed to be numbered–but why?
The question of numbering makes it very hard to deal with. Let me give you an example, I have a View with entries as follows:
-
A
-
B
-
C
-
D
I pick in my List 1, 3, and 4.
What you are saying is that the field should show:
-
A
-
C
-
D
It is possible but very messy, because you need to do a re-number every time the field is changed.
My opinion is that the pain is worse than the gain.
Regards
Rolf Pfotenhauer
Subject: RE: How to create bullet list in a field
Hide you text list field. Create a computed for display field that is set for multi value and set to separate multiple values with a new line.
For your formula use this:
n := 1;
s := @While(n <= @Elements(YourTextListFieldHere); l := l +@text(n)+ “:”;n := n + 1);
numlist := @Explode(l;“:”);
numslist + " - " + YourTextListFieldHere
This will crudely simulate numbering.
Subject: Use a 2-Column table
Create in first column a computed for display field called TNums (multivalue w/ NewLine sep) with the following formula:N1 := @Explode(“0,1,2,3,4,5,6,7,8,9”; “,”);
N2 := N1 *+ N1 *+ N1;
@Subset(@Subset(N3; -999); @Elements(YourPickListField))
And be sure to do a Refresh on the doc after using your Picklist