Multiple values in a check box formatted field are stored as a list separated by returns. Referring to such a field in a merge text block should produce such a return separated list, but your text block may not be sized to display all the listed values. Sometimes, developers use a calculation field to convert the vertical list of values to horizontal ones by using this calculation:
Substitute ( List ( CheckboxField ; ¶ ;", " ) )
This calculation replaces the returns with a comma-space to produce a horizontal list of values to use in your Merge text block.
Ok. I realize why it wasn't expressing them as a list. I have two fields. One is called Fund and the other is called Fund(s). For some reason, FM doesn't like putting Fund(s) as a merge field, and when I click out of the text box it automatically changes <<Fund(s)>> to <<Fund>>, and because Fund is empty in most cases, it just wasn't showing anything. This is an easy change, as I can just rename the field to something else.
It would still be much better if I could make it look like a checkbox. Is there any way to do this in a merge field?
No way to add the check boxes inside the merge text as far as I know. Why do you want this? (Maybe there's an alternative approach that will work for you.)
It's really just an aesthetic thing for a summary report that I am making. I would like to see the entire value list with just the categories selected checked off. Given the number of categories and the similarity of some of their names it is just easier to have them all listed in a standard format so that the person looking at the summary can easily tell which ones are selected as well as which ones are explicitly not selected.
Edit: Now that I look at what I posted it seems maybe a little more about ease of comprehension rather than aesthetics.
Hmm, but why do you need a merge field to do that? Why not just place the check formatted field on your report layout?
Because I want a border around all of the values in the text box, and I cannot do that by making separate fields and putting a rectangle around them because I need the border to resize itself because the length of the contents of the text box varies quite a bit.
Actually, while I would like the border, I can probably live without it, and if I do then I can just place individual fields and forget this whole issue. I'm still interested in whether there is any way to get a checkbox into a merge field. Maybe I'll take up writing plugins, though then I would need to get advanced.
You can put a border around any field, not just merge text.
"because the length of the contents of the text box varies quite a bit."
How is it that the length varies? With checkbox format, you see the entire list of values in the value list--not just the selected values so I wouldn't expect the size of the field to vary unless you are using a conditional value list--a definite possibility or if you only want to display the selected values--but then I don't see the purpose of the checkbox format.
Fields can be set to slide up | Resize enclosing part if you select them in layout mode, and then use the sliding and Visibility section of the inspector's posititon tab to specify those options.
Key facts about sliding:
- It's only visible in preview mode and when you print/save as PDF...
- All layout objects below a slide/resize field need to also be set to slide up and resize.
- Objects in headers and footers will not slide.
- Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
- Consistent side borders are difficult to achieve with sliding fields. When part of table like display with other fields that have borders.
Sorry, I was unclear. The text box contained four merge fields, only one of which was a checkbox field. I wanted a border that would go around all four fields an would shrink to fit around those fields when they slid up.
Does the checkbox field vary in size or just the other fields? (I think I see a way that might work if we are really sneaky here.)
Just the other fields. Does your solution involve putting side borders on the checkbox field, side and top borders on the field above it, and side and bottom borders on the field below it, and then making all of their side borders line up?
That's an option I hadn't considered. Does it work?
I was thinking of another approach, that (after further thought) probably won't work.
Let me know if your idea works or not. If it doesn't, I'll play with a demo file and see if my idea works or not.
Sorry, I didn't have any more time to work on this Friday. It would appear that what I suggested does work in my situation, though I imagine that it might fall apart in some other situations.