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

Can I use checkboxes to generate numbers?


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

Recommended Posts

  • Newbies
Posted

Hi, I hope this question is in the right place. I am using Filemaker to create a database of unique identification numbers for individual study animals (turtles). We mark individuals by notching the shell in unique locations and assign numbers based on how many notches there are and their location.

What I would like to do is create a series of checkboxes that appears on each record entry, and have each checkbox associated with a value. Once I check a box I want the individual ID field to add up the numbers to generate the unique ID code for that individual.

I played around with value lists and scripts to try and accomplish this, but it didn't produce the results I wanted.

Hopefully this is a possibility, thanks in advance for any help!

Posted

If each field has a value list with a different value associated with it for your checkboxes, then you can simply use a calc that sums the values up.

Sum ( field1; field2; field3; fieldN )

Posted

I don't get this - shouldn't the order be reversed? Generate a unique ID first, then determine how many notches are required at each location to encode the unique number? If you determine the number of notches first (how?), then how it's going to be unique?

In any case, a simple sum of all notches will not be work here: 1 notch at location A and 2 notches at location B equals 3 - the same as 2 notches at location A and 1 notch at location B. We need to know how many locations are there and how many notches can be made at each.

Posted

If you think of the notches (e.g. n1, n2, n3, n4) as binary digits then it can be converted to base 10 with:

(n4 * 2^3) + (n3 * 2^2) + (n2 * 2^1) + (n1 * 2^0).

Using check boxes will create the 1's and 0's for you.

  • Newbies
Posted

Sorry, I should have been a bit more explicit. A turtle has a certain number of marginal scutes (the edge of the turtle's shell when viewed from above). Turtle researchers have designated a certain number for each scute, and have developed marking schematics that allow one to uniquely mark as many as 300,000 individuals without replicating a certain shell mark sequence.

I could just make the individual ID field an automatically generated number and use a cheat sheet to tell which scutes should be marked, and may end up doing that if it is easier to figure out based on the recommendations I have receieved so far, but I was hoping for a checkbox solution with this database so I can allow others to use it and see a graphical interface.

Thanks for the suggestions, I will give them a try.

Posted

I am afraid I still don't get it. Going by your description, three processes are required here:

For a "new" turtle:

1. Generate a unique ID;

2. Translate the ID into markings;

For a previously marked turtle:

3. Translate markings back into ID.

Points #2 and #3 should be easy enough once you know the details* of the marking scheme. I also see no problem in presenting the markings as a series of checkboxed values, or allowing the user to enter markings by checking off values.

But I don't see how you can get a unique number/code by having users toggle checkbox values on and off.

---

(*) By details I mean more than just "a certain number for each scute".

Posted (edited)

Interesting thread. As Michael indicates, it can't be simple addition. There must be rules of translating the numbers back into the graphical representation.

Let's say we are viewing a turtle from top view. The rule might be - start at head and work clockwise. If there are 22 scutes on a turtle and they are always notched 6 times, then a notch might be placed at scute numbers 3, 7, 12, 16, 19 and 21.

The ID would then need to be: 0-0-1-0-0-0-1-0-0-0-0-1-0-0-0-1-0-0-1-0-1-0 ... but if you don't maintain the scutes without notches (as 0s) then the pattern will be lost and not unique. However, if each notch is a different number (and all scutes are numbered beginning at the head and working clockwise), then the iD would simply indicate the scute number as: 3-7-12-16-19-21.

Simply, we do not know your numbering scheme and we must. Even then, if whomever notches the turtles doesn't refer to this unique list, there is possibility that two turtles could have identical IDs. Do you have control over the notching? Or, if you inherit a turtle and it already has identical notch pattern, can you add another notch somewhere (assuming you can't glue one back)?

We need these rules! Once we have them, you can turn your turtle into a visual for quick, easy identification and control the uniqueness of the ID. [color:green]From here, there will be many ways to display and select the information, from related records based upon scute number to checkbox in repeating field (where each rep is scute number made to look like checkbox).

Added 10 minutes later: Keep in mind that we are talking only about the marginal scutes - I believe this shows the configuration quite well. I counted 22 but I just woke up and each species of turtle may have a different scute configuration/count.

LaRetta

Edited by Guest
  • Newbies
Posted (edited)

Ok, I should have put this image up here to begin with but wasn't sure if I even had it. Each scute only gets one notch, and each scute corresponds with only one value. Individual 1 would only be marked on one scute, while individual 37 would have 3 scutes marked (10, 20 and 7).

What I had envisioned for my form layout was to include this image with a checkbox next to each scute that has a value, and by clicking on that box you would "activate" that value. The individual ID field would then add up each activated value.

Hopefully I've included all the information needed this time! Sorry for any confusion, and thanks for the help.

Oh, and, yes theoretically each person notching turtles would use the convention in the image to do so. Deviating from that and replicating the same code would create problems, although multiples of the same ID number would be ok if seperate turtles species started at individual 1 (i.e., species X individual 1 would be acceptable).

turtleshell.jpg

Edited by Guest
Posted

OK, so now we know how it's supposed to work. I don't know who told you that this will "allow one to uniquely mark as many as 300,000 individuals". There are 5 groups of 4 possible notches. Each group represents one decimal digit. The fact is that this system can go as high as 99,999 and no more.

What's worse is that the method is heavily error-prone. You are not allowed to mark more than two notches in a group, and you must not mark 4 and 7 together. If you make a mistake, you have created invalid code: although 4 + 7 are distinct from 10 + 1, both will be interpreted as 11 - so even though two turtles may be physically marked differently, this system will consider them logically as one and the same. I don't suppose there's "undo" when filing notches on a turtle...

In contrast, using a simple binary method of 20 on/off bits, you could mark up to 2^20 = 1,048,576 individuals uniquely - and no two distinct physical markings would be read as same.

Anyway, take a look at the attached file. It uses repeating fields to calculate the required markings from a serial ID, and it can also calculate the ID from markings entered by the user in a global repeating field. You can take individual repetitions and place them over a drawing, or create 20 buttons to toggle each repetition individually (I have included 4 sample buttons in the file).

TurtleMarking.fp7.zip

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