Jump to content

Need help here regarding the Subject Schedule using Checkbox


This topic is 2170 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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!

 

Check.png

Edited by Tondats Fuertes
Link to comment
Share on other sites

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 by rwoods
Link to comment
Share on other sites

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".

Check2.png

Link to comment
Share on other sites

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 by Steve Martino
Edit: Corrected from Lee's comments
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

This topic is 2170 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.