Our Preferred 5 Star Hosting Provider - Award Wining FileMaker Pro Hosting
Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    FREE Member
    Join Date
    Nov 2006
    Posts
    48
    Downloads
    0
    Uploads
    0

    Check Yes/No Radio button based on condition

    I am designing a Training/Qualification database with several tables one of which is a "Qualification" Table where I can show qualification an individual holds with Yes/No radio buttons. There is another "Training Completed" table that shows courses the individual has attended. The courses an individual can take are defined in another table called "Courses". I would like to be able to change the color of the Yes/No radio buttons (or not be able to check the Yes button) in the "Qualification" table when an individual has completed all mandatory training as defined in the "Courses" table. Any help will be much appreciated. Thanks in advance.

    Faraz
    Warning: This is an Old Thread
    This discussion is older than 420 days. information contained in it may no longer be current

  2. #2
    FREE Member
    Join Date
    May 2006
    Posts
    24
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition


  3. #3
    FREE Member
    Join Date
    Nov 2006
    Posts
    48
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition

    Thanks for your response sbg2. I tried the link you suggested, but I don't think it relates to what I am trying to do.

    So here is what I am trying to do:

    I have 3 tables with the following fields.

    The 1st table is called "Courses" in which I define the available courses. It has the following fields:
    Course ID
    Title
    Training Method
    Equipment Type
    Test Required
    Passing Score

    The 2nd table is "Training Completed" where I show the courses an individual has completed. It has the following fields:
    Employee ID
    First Name
    Last Name
    Course ID - value list based on Courses::Course ID
    Title - Looked up value based on Course ID
    Score
    Date completed

    The 3rd table is "Qualification" where I show the authorizations an individual has been issued. It has the following fields:
    Employee ID
    First Name
    Last Name
    RII - Yes/No radio button
    RII Issue Date
    RII Expiry Date - Calculated (RII Issue Date +365)
    AWR - Yes/No radio button
    AWR Issue Date
    AWR Expiry Date - calculated (AWR issued Date + 730)
    Engine Run - Yes/No radio button
    Engine Run Issue Date
    Engine Run Expiry Date - calculated (Engine Run Issue Date + 730)

    In order for an individual to get RII authorization, he must complete courses 0100, 0500, and 0600. I would like to have the Yes/No Radio button to change from red to green, when 0100, 0500, and 0600 are entered against that individual in the "Training Completed" table. If any one of these courses are missing, I would like the field to remain red.

    Any help will be much appreciated.

    Faraz

  4. #4
    Gold Member LingoJango's Avatar
    Join Date
    Jan 2008
    Posts
    292
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition

    Assuming the links are all by ID fields and the course numbers are ID numbers.

    Assuming Training Completed doesn't get a record until the training has actually been completed.

    Assuming all ID numbers are 4 digits.

    Conditionally format the Yes/No field using the formula
    PatternCount (List (TrainingCompleted:CourseID) ; "0100¶" ) > 0 and
    PatternCount (List (TrainingCompleted:CourseID ) ; "0500¶" ) > 0 and
    PatternCount (List (TrainingCompleted:CourseID ) ; "0600¶" ) > 0

    You might also want a script that tests for those particular requirements before it lets you add anything else regarding RII.

    There's probably a custom function around somewhere to simplify the calc if you have to use it more than once and for different requirement lists. Or you could set one up yourself (I'm still figuring out recursive functions).

  5. #5
    FREE Member
    Join Date
    Nov 2006
    Posts
    48
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition

    Thanks for your help LingoJango. I will try it and let you know how it works. By the way is there some way to keep from checking the Yes button if the required courses are not completed and entered in the Training Completed table ?
    Faraz

  6. #6
    Gold Member LingoJango's Avatar
    Join Date
    Jan 2008
    Posts
    292
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition

    Just thought of a refinement to that calc:

    PatternCount ( "¶" & List (TrainingCompleted:CourseID ) & "¶"; "¶0100¶" ) > 0 and
    PatternCount ( "¶" & List (TrainingCompleted:CourseID ) & "¶" ; "¶0500¶" ) > 0 and
    PatternCount ( "¶" & List (TrainingCompleted:CourseID ) & "¶" ; "¶0600¶" ) > 0

    Just to be on the safe side and make sure you catch all instances of these values and no others.

    To keep people from checking Yes you could use the calc to validate the field, or else you can set the field behavior ON EVERY LAYOUT to be non-enterable in browse, then place a button on top of the Yes option that calls a script that enters the field and sets it to Yes if the above calc is True (you'll also need another button for No, or else make the script a toggle).

    The second option sounds like more work, but it'll be less trouble if your RII requirements change sometime later: the button will light up red if the new requirements haven't been met, but if it's already set to yes you won't have trouble every time you change some other field in that record.

  7. #7
    Senior Moderator - FMT Preferred Developer Consultant - Netherlands, Europe, Asia, USA Maarten Witberg's Avatar
    Join Date
    Mar 2004
    Posts
    6,023
    Location
    netherlands
    FileMaker Version
    FM 10 Developer, FM 10 Server, FM 11, FM 11 Developer, FM 11 Server, FM 12, FM 12 Developer, FM 12 Server, Older Versions 2-8
    OS
    Windows & Mac
    Skill Level
    Developer
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition

    I advise against hardcoding ID's in a calculation. I only quickly glanced through your posts, but I think you need two join tables, one between employees and qualification. Second join table is between employees and courses.
    Based on the selection in portal 1, portal 2 shows required courses, with their status completed or not completed.

    The interface could look something like this but structurally it would be a bit more complex I think. But doable.
    Stick to what you don't know.

    http://www.maartenwitberg.nl


    -------

  8. #8
    Gold Member LingoJango's Avatar
    Join Date
    Jan 2008
    Posts
    292
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition

    You're absolutely right, kjoe. Especially if the qualifications have an expiry date that requires retaking the courses!

  9. #9
    FREE Member
    Join Date
    Nov 2006
    Posts
    48
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition

    Thank you LingoJango. I tried your suggestion and it seems to work great.

    Thanks for your comment kjoe. I am very green at this. Could you please elaborate your suggestion.

    Ideally speaking, I would like to create a field in the Courses table with a drop down value list such as RII mandatory, AWR Mandatory. Then have a some way to check if the person has completed all courses checked mandatory and have the Yes.No radio button change color. If the training requirements ever change, the calculations will not require changing.

    Faraz

  10. #10
    Senior Moderator - FMT Preferred Developer Consultant - Netherlands, Europe, Asia, USA Maarten Witberg's Avatar
    Join Date
    Mar 2004
    Posts
    6,023
    Location
    netherlands
    FileMaker Version
    FM 10 Developer, FM 10 Server, FM 11, FM 11 Developer, FM 11 Server, FM 12, FM 12 Developer, FM 12 Server, Older Versions 2-8
    OS
    Windows & Mac
    Skill Level
    Developer
    Downloads
    0
    Uploads
    0

    Re: Check Yes/No Radio button based on condition

    i can probably make a sample later this week.
    Stick to what you don't know.

    http://www.maartenwitberg.nl


    -------

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 04-28-2012, 02:26 PM
  2. Create a list of clients based on radio button selection
    By gatzkerob in forum FileMaker 11 Advanced
    Replies: 6
    Last Post: 06-30-2011, 05:26 PM
  3. Replies: 8
    Last Post: 01-04-2011, 10:30 AM
  4. Replies: 4
    Last Post: 04-30-2008, 02:15 PM
  5. Portal Contents based on Radio Button value problem
    By Soenso in forum Portal & Relationships
    Replies: 2
    Last Post: 02-23-2006, 07:26 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Welcome to the Original FileMaker Forum
With designated forums for almost every FileMaker topic...FileMaker Today is a free-to-join community where you can boost your FileMaker expertise, build better solutions and solve your technical challenges. If you're building FileMaker solutions, this is the place for you.
Follow FMT
We Are FMT
FMT is home of The World's leading FileMaker News Site, Worldwide Developer Directory, FileMaker Connect Community and so much more.