Tony Diaz 0 Posted July 21, 2020 Share Posted July 21, 2020 This is a two part question: A Checkbox Field is the selected options from a Value List separated by a return (¶) So if I have a Value List where the options are Alpha, Bravo, Charlie, Delta ... and I've selected three of them, the field will be stored as: Bravo¶Delta¶Alpha Or visibly: Bravo Delta Charlie What I'd like to do is re-format the display of those values as "Bravo, Delta, Charlie" (obviously in the order selected, as the standard way value lists populate the fields) In the sample Filemaker file attached, the blue text are examples of how I'd like to see the choices displayed.. It's likely some kind of calculation with concatenated values? .. The top example where the value list is straight forward using the text values. The second row is using values that would be related by their IDs so that the ID's would stay the same, but any value assigned to them would change globally, and also be formatted in either way. Value, Value, Value Value Value Value The workflow here is the tick boxes would be on the admin side of things, while the blue text is on the display / reporting side. You can choose from the available options during inputting, but for displaying they only see the selected options. The Value List here is based on stored values in a table, with their associated ID. ValueListSandbox.fmp12 Link to post Share on other sites
comment 1,777 Posted July 21, 2020 Share Posted July 21, 2020 To list the values stored in your checkbox field as a comma-separated list, all you need to do is substitute the return with a comma. This will preserve the order in which the values are stored in the checkbox field (i.e. the order of selection). Listing the values that are NOT stored in the checkbox field (i.e. the corresponding values from the 2nd field of the value list) is more complicated - esp. if you want to list them in order of their selection. Do you really need this? Keep in mind that you can get a list of the selected values by using the List() function over a relationship. Link to post Share on other sites
Tony Diaz 0 Posted July 21, 2020 Author Share Posted July 21, 2020 I actually don't care about the order of their selection. It was more of a precursor to "They're going to be listed in that order due to the way FileMaker works" so that does not matter to me. On the values being listed from the 2nd field, I don't care what the order is at all. I'm trying to duplicate this kind of display of whatever choices I've selected: Platforms and Genre each have multiple options selected. So they're separated by commas. The others in this example are each single values. Otherwise, right now I'm doing it manually when adding them: Clicking in the field, typing ",<space><ESC>" which gets the drop down values to show again and then picking the next desired one. But of course, I can't pass back changes in the Value List values to those fields.. ... on the first part. D'oh. Replace return/pilcrow with ", " in a non-stored calculated field. Link to post Share on other sites
comment 1,777 Posted July 21, 2020 Share Posted July 21, 2020 12 minutes ago, Tony Diaz said: ... on the first part. D'oh. Replace return/pilcrow with ", " in a non-stored calculated field. Actually, the field can be stored, as it references only the local field. On the second part, you can do the same thing using (as I already said): Substitute ( List ( TableOfValues::SecondField ) : ¶ ; ", " ) and this field will be forced to unstored. Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now