May 11, 20187 yr Hello FM Gurus, good morning. Currently, I'm making a solution it's called "Enrollment and Grading System" of a certain school here in our place. I'm having a problem here with this Checkbox. (Image Below) As you can see in the image, I checked all the boxes on the checkbox list but unfortunately it will display only the letter "M". I want the output should look like this "MTWThF". I really need your help guys. Does anyone here can help with this? Thanks and God bless! Edited May 11, 20187 yr by Tondats Fuertes
May 11, 20187 yr Hi Tondats When you check multiple boxes like this what FileMaker actually records (if you view it as a text field) is all the selected values with carriage returns between them. Like this :- M T W Th F Your text box only has one line so you are only seeing the 'M'. So, you can either display the text field with more vertical space, or define a calculation field to show the values in the way you need like this :- myFormattedSelections = Substitute ( myCheckboxField ; "¶" ; "" ) to give 'MTWThF' or you could put some commas in like this myFormattedSelections = Substitute ( myCheckboxField ; "¶" ; ", " ) to give 'M, T, W, Th, F' Hope that helps Edited May 11, 20187 yr by rwoods
May 11, 20187 yr Author Hello rwoods, good evening. Your post is very helpful, that solves my problem. However, there is one problem again. As you can see below, if I select first the "T", second "M" and third "W", the output is not what I wanted to be. (See the image below) The output should be like this "MTW" not "TMW".
May 11, 20187 yr I think this may do it. Substitute (FilterValues ( ValueListItems ( Get ( FileName ) ; "NameOfYourValueList" ); Table::CheckboxField); "¶";" ") Assuming your checkbox set is based on a value list in the order displayed: M T W TH F Edited May 11, 20187 yr by Steve Martino Edit: Corrected from Lee's comments
May 11, 20187 yr Hi Steve, I modified your calculation Substitute ( FilterValues ( ValueListItems ( Get ( FileName ) ; "NameOfYourValueList" ); Table::CheckboxField ); "¶" ; " " ) I added a space to separate the result and you had an extra trailing ")" Lee
May 11, 20187 yr Author Thanks Steve and Lee, I will try your suggestions guys. But can I ask something, what does the "Get ( FileName )" do there? I mean, what's the role?
May 11, 20187 yr ValueListItems Purpose Returns a list of the values in valuelist, separated by carriage returns. Format ValueListItems(fileName;valuelist) Parameters fileName - the name of an open database file (local or remote). valuelist - the name of a value list in the specified database file. Filename is a parameter. Get(FileName) returns the name of the current open file. If you needed the value list items from another connected open file, you would put that in place of filename instead of Get(FileName)
May 12, 20187 yr Author Thank you so much Steve. That really helps a lot. Here's the result below. My_Project.mp4
Create an account or sign in to comment