1 2 Previous Next 16 Replies Latest reply on Sep 21, 2014 11:33 PM by shelton356

    I am getting this message

    shelton356

      This field cannot be modified until “ID_PK” is given a valid value.

       

       

      I have to tables, one for students and one for notes. I can create the notes table but when i enter data such as a note, i get the error above.

        • 1. Re: I am getting this message
          keywords

          Without more information it's hard to say, but at a guess I'd say you are tryng to enter a value in a notes field but don't have a valid relationship to the notes table. The relationship needs to be checked to allow creation of related records.

          • 2. Re: I am getting this message
            Mike_Mitchell

            That error is typically seen when you're trying to modify a field in a related record that doesn't yet exist (such as through a portal). There are a couple of possibilities:

             

            1) As keywords mentioned, the "allow creation of related records" checkbox isn't selected on the relationship in the Relationships Graph.

             

            2) The "ID_PK" field is a calculation field or otherwise blocked from allowing FileMaker from entering a value (such as by security permissions).

            • 3. Re: I am getting this message
              shelton356

               

              When i go to my layout this is what is showing, i think this is why i'm getting the This field cannot be modified until “ID_PK” is given a valid value. I have a notes table with the above information in it. How do i correct the table missing?

              • 4. Re: I am getting this message
                Mike_Mitchell

                What information?

                 

                Keywords and I have given you a couple of things to look for. I suggest you check them and then get back with us.

                • 5. Re: I am getting this message
                  shelton356

                  Screen Shot 2014-09-21 at 11.06.03 AM.pngScreen Shot 2014-09-21 at 11.06.18 AM.pngScreen Shot 2014-09-21 at 11.06.23 AM.pngScreen Shot 2014-09-21 at 11.06.31 AM.pngScreen Shot 2014-09-21 at 11.06.36 AM.pngThis is how my setup is for the notes, i think the relationship is correct but when i go to the layout and enter a note i get the error regardign the ID_PK

                  • 6. Re: I am getting this message
                    BruceRobertson

                    Go to WHICH layout?

                    • 7. Re: I am getting this message
                      shelton356

                      i was just showing the setup i have for the notes

                      • 8. Re: I am getting this message
                        BruceRobertson

                        Could you answer the question please?

                         

                        You really are not providing enouh information for anybody to help.

                         

                        Given the relationship you describe, it would seem you would have a portal on a student layout.

                         

                        There is nothing about going to a Note-based layout that would trigger the dialog you describe.

                         

                        So therefore  there must be other information you are leaving out.

                         

                        Can you post a clone of your file?

                        • 9. Re: I am getting this message
                          shelton356

                          Screen Shot 2014-09-21 at 1.43.28 PM.pngIn the above layout, where notes is when i enter a note i do not get the error message anymore but where timestamp is that works but i have to enter about 5 notes until the timestamp actually work. So the earlier error i was getting “ID_PK” is given a valid value .

                          is no more. But the timestamp is off for some reason.

                          • 10. Re: I am getting this message
                            Mike_Mitchell

                            The reason is you've validated the creation timestamp to be unique. When you do that, FileMaker will reject any record entries created within the same second. Take that validation off and it should work fine.

                            • 11. Re: I am getting this message
                              shelton356

                              Thank you will do that

                              • 12. Re: I am getting this message
                                keywords

                                Looking at these screenshots, I think you are building in a significant point of confusion. Let me explain:

                                 

                                1.     In the Students table you have a field called ID_PK which is an autoentered serial number, and a second field called Student ID which is a text field defined to be a required, unique value.

                                2.     There is no indication in your schema as to how this second field gets populated. How DO you populate it? What is it for? How is it different from the ID_PK field?

                                3.     There is nothing wrong with this arrangement, by the way, as long as you know what you are doing AND you don't use it for any relationship. Some systems have this kind of setup because the users like to have some sort of code field which they can use, while the key and match fields are kept entirely separate—in fact it is recommended practice that record ID fields and foreign key fields should be not be human readable/user useable.

                                4.     The likely confusion in your setup comes from the fact that you correctly use the ID_PK field to match to a foreign key field in your Notes table—BUT that foreign key field is called Student ID (which is correctly a number field). Since you have another field by that same name back in your Student record, this is a recipe for trouble—or at least confusion—at some point, as two fields with the same name in related records will have different values.

                                 

                                I would strongly recommend you address this. (1) You could dump the Student ID field in the Students table if it is not really needed; but if you are going to maintain it then at least set it up to autoenter in some way. (2) Rename the Student ID field in the Notes table; since you are already using the nomenclature PK (primary key) why not call this field student_FK (foreign key).

                                 

                                Finally and not part of the above, although there is nothing wrong with naming your primary ID fields the same thing in each table (ID_PK), I would suggest you rename these also for clarity: in the Students table use student_PK, and in the Notes table use note_PK.

                                • 13. Re: I am getting this message
                                  shelton356

                                  Thanks for all the support and help let me me ment some of the ideals when im back at home so that I can see if this works. Again thanks. They are all good suggestions.

                                  • 14. Re: I am getting this message
                                    MSNThomas

                                    Does the ID_pk field have a value in it?  I have created tables before and created records before I had the auto-enter ID set up.

                                     

                                    Beyond that, the only time I have gotten that message is when I was trying to create a record through a pivot relationship ( I've also heard it called magic key ) and didn't have the autoenter ID set up in the table I was trying to create the record in. 

                                     

                                    Since the ID in the table I was creating the record in wouldn't populate, the global field in the table that was the context for the layout wouldn't populate, so I got the message about their not being a valid value in the field.

                                     

                                    However that is a different set up from what you are doing.

                                     

                                    It seems like the issue should be with the value in the ID_PK field in your students table.

                                    1 2 Previous Next