6 Replies Latest reply on Apr 4, 2011 7:27 PM by user20843

    Valadation and highlighting invalid fields



      Valadation and highlighting invalid fields


      I have various text fields (service name, time name) set to validate to be a memeber of a list stored in other tables.  When I enter a new record I am forced to pick from the drop down list that I set up. The problem is when I go to the list in the other table (source list) and make a change it doesn't update the other fields and then my portals are missing information.  Can anyone tell me if there is a way to "flag" items that are not no longer valid, so I don't have to click on each field to check it? or even better when I update the source field (text) have it carry over to the other text fields?   I have attached a screenshot of the way I have the field set up that I want to validate, I just don't know how to find out if someone changes the source field on me.  Thank you.


        • 1. Re: Valadation and highlighting invalid fields

          It would help to see the relationship involved here so we can see exactly what "breaks" when you change a value in the other table. I could be that you have two fields for the same data--one in each table where you should only have one so that your changes appear automatically. It could also be that the relationship should be based on a different field and in other cases, you may want to implement a script that uses your update to find and update records in the related table--but this is usually avoidable if you set up your relationships and layouts correctly.

          • 2. Re: Valadation and highlighting invalid fields

            This is one section of the database, where services are put together, all realtionships are: one field "=" one field

            • 3. Re: Valadation and highlighting invalid fields

              That doesn't tell me anything that enables me to help you.

              Something like this would help:

              table::keyfield = anothertable::anotherkeyfield

              where each table and field is named. Then use this information to explain how changing a value in one table is affecting the other.

              • 4. Re: Valadation and highlighting invalid fields

                Service Time::Service=Service Details::Service

                Where changing Service Details::Service does not cause any changes in Service Time::Service field but if I click on any recod in Service Time::Service  then click off it will get flagged by validation as not being a member of  Service Details::Service. 

                • 5. Re: Valadation and highlighting invalid fields

                  What kind of field is service and under what circumstances are you making this change?

                  I could be wrong, but I think you should have this relationship:

                  Service Time::ServiceID = Service Details::ServiceID

                  Where ServiceID is an auto-entered serial number in which ever of these two tables functions as the "parent" of the other. Remove the service field from Service Time and replace it with a copy of the Service field defined in Service Details. When you edit this field, all changes will now appear automatically.

                  Your value list can be used to select the ServiceID field as the column 1 value and can display the service field as column 2.

                  As a general rule, fields used as a primary key to link one table to another should not be modifiable and should always have an auto-entered unique value (Which in FileMaker means an auto-entered serial number field).

                  • 6. Re: Valadation and highlighting invalid fields

                    That helps, and solves my problem.  I needed serial numbers and to insert a copy of Service Details::Service Name, not a new field with a lookup of Service Details::Service Name. Thank you for your help.