8 Replies Latest reply on Jul 24, 2012 10:57 AM by LambdaEnt

    Related portal showing uncheck items only

    LambdaEnt

      Title

      Related portal showing uncheck items only

      Post

      I want to create a todo list, with a few fields (qty, size, description), and a field to check off when done.

      But I need the layout to only show only unchecked items, and the ability to add more.

      I assume this would be done with a self-related portal, but still confused as to how this works.

      Thank you!

      Needed.jpg

        • 1. Re: Related portal showing uncheck items only
          philmodjunk

          There are a number of options possible. A portal filter that excludes records where the check box field is not empty is one option.

          A calculation field that returns a value such as 1 when the check box field is empty (IsEmpty(CheckboxField ) is all you need) could be used if you don't have Filemaker 11 or 12 and need to set this filter condition at the relationship level.

          • 2. Re: Related portal showing uncheck items only
            LambdaEnt

            That did it! FMP 11 BTW. 

            Easy! Thank you.

            • 3. Re: Related portal showing uncheck items only
              LambdaEnt

              Well, almost. What field should create the relationship?

              If I choose item to item as the relationship, then adding a record in the portal, added a record in the current table.

              • 4. Re: Related portal showing uncheck items only
                Abhaya

                Hi

                In item table create a Constant calculation field and its value is 1(e.g global)

                No doubt the checkbox internally keep 1 for check and NULL for uncheck.So make a selfrelationship among item table with the help of constantfield(e.g global) and the checkbox like this

                Constant field != checkbox field,it will return all unchecked record and will show in the portal that is coming from this newly created relationship.

                Thanks

                • 5. Re: Related portal showing uncheck items only
                  philmodjunk

                  Well, almost. What field should create the relationship?

                  I have no idea. There's insufficient detail to your post to be able to tell.

                  Is there one parent record for this checj list and you thus have more than one check list with each set of items assigned to a different parent record?

                  Or is there ever only just one check list in the entire database?

                  • 6. Re: Related portal showing uncheck items only
                    LambdaEnt

                    I need only one checklist in the entire database. The idea is that it is a single layout where currently needed items are displayed.

                    • 7. Re: Related portal showing uncheck items only
                      philmodjunk

                      Do you even need a portal then?

                      You could put a button on the row of a list view layout where clicking it performs a script that sets a value in a field to "check it off" and then omits it from the current found set. Scripts--either via OnLayoutEnter or a button that takes you to this layout could perform a find to limit the listed records to those not yet checked off.

                      That would seem simpler to set up than using a portal.

                      If you need the portal (It does free up real estate on the screen for other things), you'll have to decide on what table to use as the parent table. You might use this relationship:

                      SomeOtherTable::anyField X CheckListTable::anyfield

                      But if you do, you'll need to add a button with a script for creating a new record in the CheckList table.

                      SomeOtherTable::constOne = checkListTable::FkField

                      where constOne is a calculation field with 1 as its sole term and fkField as a simple number field, you can enable 'allow creationg via...' for the checkListTable and then your portal lists all records in the checkListTable but now you can create new check list items directly in the portal.

                      • 8. Re: Related portal showing uncheck items only
                        LambdaEnt

                        Didn't even consider this. Done deal! Thanks again, you ARE the guru.

                        You could put a button on the row of a list view layout where clicking it performs a script that sets a value in a field to "check it off" and then omits it from the current found set. Scripts--either via OnLayoutEnter or a button that takes you to this layout could perform a find to limit the listed records to those not yet checked off.