Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Data entry loop from a checkbox

Featured Replies

sorry for being a pest but i reeally need help...again.

I think this requires some type of loop

Ok i have checkbox(setup,participants)and then 10 fields(brackets,entry 1-10)i need a script that will enter the checked data items into there own seperate entry field and then stop when all checked items have been put into there own seperate entry field.

eg

I check A,D,E,G

The script will put A into entry 1, D into entry 2 and so on and continue till all checked data is in an entry field

You could use a loop to make it dynamic but it's a lot easier to write it as 10 Set Field steps in a row:

Set Field [MYTABLE::Field1; Case(PatternCount(MYTABLE::CheckBox; "A"); "A")]

Set Field [MYTABLE::Field2; Case(PatternCount(MYTABLE::CheckBox; "B"); "B")]

Set Field [MYTABLE::Field3; Case(PatternCount(MYTABLE::CheckBox; "C"); "C")]

etc...

  • Author

Thanks in the end there will be 32 entry fields so i felt a loop would be better.

It almost sounds like you are putting it together only to then take it apart again. I smell multiple like-field syndrome and flat-file structure. I wonder if there aren't better ways of getting the results you wish. Maybe those entries should be records instead? :wink2:

Yes, why do you want to separate the check box field before I put time into writing a looping script?

  • Author

thanks for all your help this is what im trying to do.

i have tournament brackets therfore 32(opening places) to start with, i want the person generating the brackets to just check upto 32people who are entering the tournament and the script will then sort the names checked into the bracket fields.

You really should store the 32 people in 32 separate records in a new table. You can then enter them through a portal on a Tournament table layout. Since the people are now on separate records, you won't need any special scripts to parse them out because you can just the built-in sorting feature.

I'm also going to guess you already have a table for People and that People can participate in more than one Tournament. This is a many-to-many relationship and requires another new table called a Join. I don't have an example of your exact solution but I do have one very similar. It is based on Invoicing with tables for invoices, products and a join table. I have attached this example file. Why should you spend the time learning this technique. Well, it will allow you very flexible reporting and it's just the right way to do it.

joinprint.fp7.zip

  • Author

Im still struggling i think my relationships are all wrong. If i explain my system and sent you my file if you could help i would be very grateful.

Ok each member has there own profile page,there name must be unique.This is my first table.

Each member has there own points chart,this is my second table.

I have a 3rd table explaing each tournament, my 4th table is tournament setup here i set the criteria for the next tournament.Once this is done it should go to a 5th table called brackets.

I am trying to export the names entered in tournament setup into the brackets table.After tournaments are complete points are to be automatically assigned to the relevant member and points field based on the tournament type added to there points chart.

thanks very much

Morlord_Database.zip

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.