Jump to content

Data entry loop from a checkbox


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

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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