8 Replies Latest reply on Jan 6, 2012 11:16 AM by TreyWomack

    Multiple fields error "is defind to require a value....."

    TreyWomack

      Title

      Multiple fields error "is defind to require a value....."

      Post

      First off, let me say that I'm not that well versed in Filemaker. I inherited this program which was patched together to do our payroll. I have changed nothing when this error just started appearing.

      I'm using Filemaker Pro 10 Advanced.

      This is my error:

      "BillDay" is defind to require a value, but is not available on this layout. Use another layout to assign a value to this field.

      I know enough to clear the validation field, which always rechecks itself after I save and close. Since this is a field that is never used anyway, I went ahead and just deleted it to see if that would fix my problem. Well, it fixed that problem but then another field popped up with the same error. If I delete that field, then another field will pop up with the same error. I don't want to start deleting all kinds of fields, when I'm not very familiar with how this was put together.


      I've pasted the script in hopes that someone can take a look at it and tell me if you see anything that might be causing my problem.  Thanks fro your help!

      • Show Custom Dialog [ Title: "Alert"; Message: "This will write all records to the solomon database and archive them permanently. Are you sure you want to do this?"; Buttons: “OK”, “Cancel” ]
      • If [ Get ( LastMessageChoice ) = 2 ]
      • Exit Script [ ]
      • End If
      • Refresh Window [ Flush cached join results; Flush cached SQL data ]
      • Perform Script [ “Print Notes to Change” ]
      • Go to Layout [ “Submit to Solomon” (Remote) ]
      • Perform Find [ Specified Find Requests: Find Records; Criteria: Timesheet::Work Code: “*” ] [ Restore ]
      • Set Variable [ $$FoundCountworked; Value:Get ( FoundCount ) ]
      • Perform Find [ Specified Find Requests: Find Records; Criteria: Remote::Submit: “submit” ] [ Restore ]
      • Constrain Found Set [ Specified Find Requests: Omit Records; Criteria: Remote::updated to solomon: “UPDATED” ] [ Restore ]
      • Set Variable [ $$FoundCountSubmitted; Value:Get ( FoundCount ) ]
      • // If [ $$FoundCountSubmitted ≠ $$FoundCountworked ]
      • // Show Custom Dialog [ Title: "Alert"; Message: "You must have all tickets ready to submit before proceeding."; Buttons: “OK” ]
      • // Exit Script [ ]
      • // End If
      • Sort Records [ Specified Sort Order: Timesheet::Start Time; ascending ] [ Restore; No dialog ]
      • Go to Record/Request/Page [ First ]
      • Loop
      • If [ Remote::Ticket Number ≠ "TAY0000000" ]
      • Perform Script [ “Write Inventory” ]
      • Perform Script [ “Write return Inventory” ]
      • Set Error Capture [ On ]
      • If [ Remote::Call TypeStrip ≠ dbo.smServCall::CallType ]
      • Copy [ Remote::Call TypeStrip ] [ Select ]
      • Paste [ dbo.smServCall::CallType ] [ Select ]
      • End If
      • If [ Remote::Date Promised to Solomon ≠ "" ]
      • Copy [ Remote::Date Promised to Solomon Calc ] [ Select ]
      • Paste [ dbo.smServCall::ServiceCallDateProm ] [ Select ]
      • End If
      • If [ Remote::Call Status to Solomon ≠ dbo.smServCall::CallStatus ]
      • Copy [ Remote::Call Status to Solomon ] [ Select ]
      • Paste [ dbo.smServCall::CallStatus ] [ Select ]
      • End If
      • If [ Remote::Assigned Tech to Solomon ≠ dbo.smServCall::AssignEmpID ]
      • Copy [ Remote::Assigned Tech to Solomon ] [ Select ]
      • Paste [ dbo.smServCall::AssignEmpID ] [ Select ]
      • End If
      • Copy [ Remote::Notes to Solomon ] [ Select ]
      • Paste [ dbo.Snote::sNoteText ] [ Select ]
      • Set Field [ Remote::updated to solomon; "UPDATED" ]
      • Pause/Resume Script [ Duration (seconds): 5 ]
      • End If
      • Go to Record/Request/Page [ Next; Exit after last ]
      • If [ Get ( LastError ) ≠ 0 ]
      • // Halt Script
      • End If
      • Set Error Capture [ Off ]
      • End Loop
      • Go to Layout [ “Check Notes” (Remote) ]
      • Perform Script [ “Export All” ]
      • Perform Script [ “Import All” ]
      • Perform Script [ “Show Updated Info Dean” ]
      • Perform Script [ “Show Updated Info Steve” ]
      • Perform Script [ “Show Updated Info” ]
      • Perform Script [ “Inventory Report” ]
      • Enter Browse Mode
      • // Perform Script [ “Clear All Data” ]
      • Go to Layout [ “Startup” (Timesheet) ]

        • 1. Re: Multiple fields error "is defind to require a value....."
          philmodjunk

          Obviously "BillDay" is defined with a required value validation rule. However, clearing the check box for that field should not revert back to selected when you click OK to dismiss field options and manage database. The change should "stick"--so what you describe seems very odd. Perhaps you have fields of the same name defined in more than one table and you cleared this validation for the field in the wrong table?

          There's really not much to go on from your script as we do not know...

          1) what layout is current when you perform the script and we do not know what table occurrence is specfiied in layout set up for it. Thus, we do not know the relationship context in place when the script is performed.

          2) I see references to table occurrences named: TimeSheet, Remote, and dbo.smServCall, but do not know what relationships are defined for them.

          3) There are many perform script calls here and we do not know what those scripts do

          I do have two suggestions:

          1) The script uses copy and paste to move data from one table to another. This is not the best way to move the data from table to table. You should use set field instead. It's possible that a layout was edited that removed either the field from which the script copies a value or the field to which it pastes a value. That would break your script as copy and paste both silently fail if the referenced field is not present on the current layout when the script step executes. I sometimes refer to scripts with copy/paste steps as "brittle" as it's easy for layout changes to accidently break such scripts. (Set field does not have this vulnerability and also leaves any data the user may have previously copied to the clip board intact.)

          2) I see indications that you have FileMaker Advanced given the disabled script steps in what you posted. I suggest enabling the script debugger and then stepping through your script with the data viewer up and look for issues. At the very least, this will identify what script step just executed when the error message appears.

          • 2. Re: Multiple fields error "is defind to require a value....."
            TreyWomack

            As I mentioned, I didn't create this Filemaker program so I'm not surprised that it uses shoddy coding like you mentioned. Since I'm a Filemaker Novice (that's being generous), I'm not really sure how to provide you with the table and relationships answers you need to see.

            I do know that "BillDay" only shows up under the dbo.smServCall and the smServCall tables. I have been able to clear the check box for "BillDay" only to get another exact error for a different item that only shows up in the two previous tables I mentioned. If I clear that check box, then the process repeats itself for another item only shown on these two tables. There's a 173 fields in these tables and while I don't get the error for each field item, I'm wondering if it's safe for me to uncheck the Validation box on every item that's gets an error.

            I did run the script debugger with data viewer and the first error I got was a Code 3 here:

            • Paste [ dbo.smServCall::CallType ] [ Select ]
            • End If
            • 3. Re: Multiple fields error "is defind to require a value....."
              philmodjunk

              and while I don't get the error for each field item, I'm wondering if it's safe for me to uncheck the Validation box on every item that's gets an error.

              It won't cause your database to instantly self distruct (most likely anyway), but presumably there was a reason for these validation rules so disabling them could create any number of issues by allowing data entry errors that were previously prevented.

              If you look up "error code" in FileMaker help or click the returned code in the debugger, you'll find that error code 3 is:

              Command is unavailable (for example, wrong operating system, wrong mode, etc.)

              That's not an encouraging error. Usually, this occurs when a command from a newer version is specified in the script while run with an older version of Filemaker that does not have this step. Since Paste has been around since at least FileMaker Pro 2.5 (the first version I worked with) this is not the case here.

              You may want to open FileMaker without opening this file and then run a recover on it. (File cannot be hosted on another computer when you try this.) See if this reports any problems with your file.

              Things to keep in mind about Recover:

              1. Recover does not detect all problems
              2. Recover doesn't always fix all problems correctly
              3. Best Practice is to never put a recovered copy back into regular use or development. Instead, replace the damaged file with an undamaged back up copy if this is at all possible. You may have to save a clone of the back up copy and import all data from your recovered copy to get a working copy with the most up to date information possible.
              • 4. Re: Multiple fields error "is defind to require a value....."
                TreyWomack

                The funny thing is that everything has been running fine and no changes had ever been made. Then this error just started showing up. So I don't see how this can be a version problem.

                I made a copy of the file off the hosted computer and am now running recovering on it. I will do as you suggested and import the data back into the working copy and update you.

                Thanks again for your help.

                • 5. Re: Multiple fields error "is defind to require a value....."
                  philmodjunk

                  The funny thing is that everything has been running fine and no changes had ever been made. Then this error just started showing up. So I don't see how this can be a version problem.

                  I don't think it's a version problem either--that's just what this error code usually means unless your file is damaged in some way.

                  • 6. Re: Multiple fields error "is defind to require a value....."
                    TreyWomack

                    While I'm still recovery....I should mention that as I was using the script debugger Code 3 was only the first error I got. I also recieved a Code 502 error on a few items as I was going through the script step by step. We'll just see what this recovery does.

                    • 7. Re: Multiple fields error "is defind to require a value....."
                      philmodjunk

                      You can look these codes up for yourself. 502 indicates that while set error capture [on] was preventing any message from popping up, you had a validation error on one of your fields.

                      • 8. Re: Multiple fields error "is defind to require a value....."
                        TreyWomack

                        Sorry, I meant 509 error. I also get a 102 error. I had looked them up and knew what they meant. I just thought it may be helpful to pass the info along to you, because it means nothing to me!  Wink