9 Replies Latest reply: Jun 1, 2012 4:11 PM by Tony RSS

    Documaker - Required Fields

    Tony
      I have a question on setting up required fields in a batch environment. The documentation on the rules reference seems to indicate that I have to pick one of the settings for 'Required' in an XDD entry (Host, for example), and if the field does not get populated, RP should kick out an error. I can't even get a warning when running RP with that field empty. Is there an INI switch needed to force errors in these cases?

      Thanks

      Tony
        • 1. Re: Documaker - Required Fields
          NirmalGarga
          Hi Tony,

          This is how I have used the "Required" flag. I am sharing the settings for your reference which may be of some use to you. Please refer to the BatchingByRecip control in the Rule book or Rules Reference. You can setup an Error batch for the error condition as stated in the Rule book:

          From Documaker Rule Book:
          Error - if the error batch flag is set by another rule, send the form set to the
          specified print batch (if the form’s recipient is specified in the recipient list
          for the batch). For example, an error occurs if the Host Required field is set
          on a Move_It rule and the data is missing.

          By this, all the transactions with the missing data (fields set as "Required" but no data available on the input file), will be sent to Error batch or WIP or Manual batch. You can also see the GenDataStopOn and ;ErrorHandler;;; rules for additional information.

          < GenDataStopOn >
          FieldErrors = Yes

          If you would need GenData to STOP in case of any missing data; otherwise you can set it to "No".

          Thank you.

          Edited by: Nirmal Garga on Apr 24, 2012 10:05 PM
          • 2. Re: Documaker - Required Fields
            Tony
            I am familiar with the settings you are describing, but I don't have any errors to handle - that is the problem. I've got an XDD entry with a 'Required' value of 'Host'. When I run RP with that field not populating, I get 0 errors. There is nothing to batch differently, and GenData has no reason to stop since it was "successful".

            Perhaps I'm misrepresenting the issue, so I'll phrase it differently. When creating a field in the XDD, the value of "Required" seems completely irrelevant to how RP processes the field. If that is not a true statement, how do I configure RP to make it respond by erroring in appropriate cases?

            Thanks

            Tony
            • 3. Re: Documaker - Required Fields
              NirmalGarga
              Hi Tony,

              If you do not have any thing to handle in such scenarios but just force the field to be filled in the input file, please use the Attribute "Required" in the field level. Because the option Required->Host will set the error flag during runtime for such transactions.

              Thank you.
              • 4. Re: Documaker - Required Fields
                Tony
                I also had the field set to required on the section itself. Neither that, nor the Required setting in the XDD is forcing an error when I run RP. I want an error when this is empty; I am unconcerned with how it is batched, I just want RP to stop. Setting up error handling is not helpful if there are no errors to handle, so how do I get RP to generate errors when a required field is not populated?

                Thanks

                Tony
                • 5. Re: Documaker - Required Fields
                  891330
                  I had this exact same issue and here is what I did to get it to work. The field in the XDD had HOST already set so I left that alone. Now in the section itself at the Field Options, under Rule where you have XDD as the rule, set the Required value to Host there also. That worked for us.
                  Meaning, when the field was blank, it gave us the error. Question for you, are you XML or flat file. I don't know if that matters, but we are XML.
                  • 6. Re: Documaker - Required Fields
                    Tony
                    I have both the XDD entry set so the Required value is host, and the field is set to required on the section as well. Still no error. We are using XML. I'm assuming there is an INI switch that is something like "ErrorOnRequiredFields = Yes" that I am missing.
                    • 7. Re: Documaker - Required Fields
                      NirmalGarga
                      Hi Tony

                      One last try from my side, please try adding this line in your fsisys.ini under the <Control> group:

                      RequiredFields = Yes


                      Thank you.
                      • 8. Re: Documaker - Required Fields
                        Tony
                        I added this option, and got the same result - no errors.

                        I appreciate the advice, I'm confident one of these times I'll have the right combination of things to make this work, but I haven't hit it yet.

                        Thanks

                        Tony
                        • 9. Re: Documaker - Required Fields
                          Tony
                          Found the problem. When I was indicating what was being changed, I looked at the XDD entries inside the XDD, which seems sensible. However, the instances of each field (the ones you place on a section) are what matter. The 'required' checkbox is just for user-generated transactions. The 'required' field in the Rule section of the Field Options (which, other than Rule and Source Name I have ignored for 5 years because everything is in the XDD) was defaulting to 'Not', which overrode whatever was in my XDD. After flipping the value to 'Host' at the instance level, I gleefully receive errors. Comically, dragging a field from the Extract Bar does not appear to pull over the 'required' value that is set in the XDD, so what I put in the XDD entry is effectively useless. We actually stumbled upon this by a total accident, but I thought I'd pass it along.

                          Tony