Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Getting separated data out of checkbox field


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

Recommended Posts

Posted

Hi folks. I'm stumped, and could use your help. Sorry if it's a dumb question, but... how can I make scripts and calculations use the various separate lines of data in a checkbox field?

I've got 3 big Filemaker books, and none of them address how you can actually separate out the data from checkbox fields so you can use it. (maybe because it's so obvious, and I'm just missing it).

Here's the context:

I have patients, about whom I have to write reports. I have to write back to the doctor who referred the patient to me, and also send copies to other doctors who are involved in the patient's care.

When composing the report, it seems an ideal situation to use a couple of checkbox fields. There is a value set that lists all of the various doctors involved in that patient's care, which is used to set up the checkboxes. So the user can go "OK, this letter is to be addressed to Dr Bob" (click Dr Bob in the "To" checkbox field), and copy to Dr Dave, Dr Sally, and Dr Jane (check their boxes in the "Copy to" checkbox field).

The first field just has "Dr Bob" - which is fine. (I might even make that one a drop-down, so that makes it clear it can be addressed to only one doctor).

But the second field ends up as:

Dr Dave

Dr Sally

Dr Jane

I need to be able to run scripts and calculations that will get just the value "Dr Dave" (and work on it), THEN just "Dr Sally" (and work on it), and THEN just "Dr Jane". (Specifically, each doctor will get a slightly different letter - the "Copy" doctors will receive one with their name highlighted - so the various values will be (down the track) used to create separate related records, each containing their specific copy of the letter).

Is there a function that lets me do that?

I'm sure I could do the whole thing with portals - but particularly for the "Copies to" field, nothing using portals seems nearly as user friendly as using check boxes.

Can you help?

Posted (edited)

Is it that you are looking to send a Letter/Report to each of these Doctors, but, basically the same information? If so, couldn't you set up a report/letter layout and relate it to your found records. Those records being the Doctors who should receive the report?

If you want to make changes to each report/letter then place those fields that relate to that Doctor on the report as well.

See attached:

Patients.zip

Edited by Guest
Posted

LOL - what a great example! I love the multiple personalities diagnosis and management...

Yes, you're right - I should be setting the letter up as a report. Address to Dr Bob is invariant, but the "Copies To" field changes - all displayed, but the relevant doctor is highlighted. I'll find a way to do that. Thanks for that.

But the main part of my question remains unanswered: I don't send a copy of every letter to every doctor involved in that patient's care - only the ones this particular letter is relevant to - so I need a way to select which of that patient's doctors gets a copy of this letter.

Checkboxes are ideal and user friendly - you often see them in this sort of situation - but as a developer I still can't see how to get that information out of the field as separate names (or IDs). Every script or calculation I try seems to get me all the names at once, rather than letting me get them one at a time.

I'm sure I must be missing something basic (admission - I'm a newbie, and although I've been reading books and the manual, there are some things that aren't quite 'gelling' yet!). Surely Filemaker, in allowing multiple values to be put into a field, must have some way to then allow you to do things with those values?

I'm sure I could find a way to do it with a portal, but from a user point of view it seems quite clumsy, having to choose each doctor separately from a dropdown menu.

Posted

Filemaker uses carriage return-separated values for a lot of things, and there are functions designed specifically to deal with them:

GetValue()

LeftValues()

MiddleValues()

RightValues()

ValueCount()

FilterValues()

Posted

Thanks! Now I know where to look.

That's one of the things with FMP - it's got so many options, it's sometimes hard to know where to even begin. :)

Posted

Checkboxes are ideal and user friendly - you often see them in this sort of situation - but as a developer I still can't see how to get that information out of the field as separate names (or IDs).

I agree. Check boxes make perfect sense to end users, and you can't beat them for quick data entry or locating just records where Dr. Lewis and Dr. Jones are checked.

See attached demo for an approach that lets you eat your cake and have it too.

HTH,

Kevin

==================================================

Kevin Frank & Associates * Email: [email protected]

Voice: 707-822-6414 * Web: www.kevinfrank.com

==================================================

FileMaker 7 & 8 Certified Developer

checkbox-parsing.zip

Posted

See attached demo for an approach that lets you eat your cake and have it too.

Wow, that's amazing! Looks like you've done a many to many without a join table, just using checkboxes. I'm still trying to figure it out. Probably a bit more elaborate than I need, (I'm pretty sure I can do something with the GetValue and ValueCount calculations), but a great example of what you can do with checkboxes - thanks!

Posted

Does this work for you?

Make sure you look at the relationship graph and the fields in Patients and Doctors.

Thanks for the idea. It doesn't have checkboxes, which is what I'm really trying to do, but it's another way I could do it if I crash & burn with the checkboxes!

Posted

Oh, and if there are any FMP book authors out there, here's a suggestion - put a mention of the GetValue and ValueCount functions somewhere in the introduction to checkboxes. I looked up every index reference to checkboxes in each of the three books I've got (Stars - Learn FMP9; Cologon - FMP9 Bible; Feiler - Special Edition Using FM9), and not a single one made any reference to how you might actually use the data in fields that have more than one entry. Would have been helpful!

Still, that's what forums like this are for, I guess. Thanks for your help, everyone!

This topic is 5839 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.