5 Replies Latest reply: Mar 25, 2014 1:34 AM by 1172812 RSS

    Documaker Embedded Fields Error




      I have a case where I've embedded fields into text areas in order to justify the contents. I then use Documaker Desktop to import data from an XML file. The technique works if all I have are global fields but for example I have a field named Amount (embedded into a text area) within a section named Transaction_Details, when I trigger the import, it just throws an error and stops processing.


      The XML for the form is like so:



        <PAGE NUMBER="1">

         <SECTION NAME="HEADER1"/>





          <FIELD NAME="SettlementItem">Credit Detail</FIELD>

          <FIELD NAME="Quantity">5</FIELD>

          <FIELD NAME="UnitPrice"></FIELD>

          <FIELD NAME="Amount">(500.00)</FIELD>








      If I don't embed the fields into text areas, the import works, but when I do, it crashes Documaker Desktop. Is there something I'm missing? Thanks!

        • 1. Re: Documaker Embedded Fields Error

          You may have a support issue, but to diagnose properly please clarify your terms. Usually the word "crash" means  that the program abnormally exits with (or without) a Windows Program Fault type message. If that is the case, then you should definitely contact Support.  Nothing you import, within reason, should cause the system to crash. And I don't see anything here that looks unreasonable.  Now, if you are instead receiving some type of error messages, it would be helpful to provide the actual text of the messages. That might offer some clues as to what or where to look next. Always be sure to mention the specific version of the product and the patch level if you know it. This can be important for anyone that might know of fixes that occurred in later versions or patch levels.

          • 2. Re: Documaker Embedded Fields Error

            I'm actually pretty sure that you have found a problem that needs to be reported. It's odd because I'm reasonably certain that I have done this in the past and it was working. Some update to the product functionality has apparently broken the ability to do an import of XML with embedded fields in text areas using the Documaker Desktop / Workstation (PPS, ala AFEMain) program.


            Note, in my case the program didn't abort, but it definitely would not complete the import. It just kept going back to the import selection dialog and I could not complete the operation.

            • 3. Re: Documaker Embedded Fields Error




              The program issues a windows prompt stating


              "AFEMNW32 has stopped working

              A problem caused the program to stop working correctly. Please close the program."


              The Documaker Desktop version is


              Are there any workarounds to this bug? If I just want to indent my fields to the right without embedding them?


              Thanks again!

              • 4. Re: Documaker Embedded Fields Error

                Well first, you should report the problem to Support. Support can't enter a patch request unless they know the customer involved.


                One possible work-around comes to mind, but it might seem complicated depending upon how many of these fields and forms are going to be involved. Let's see if I can list the steps and have them make sense.


                I’ll assume that you want to do the 4 fields that you have in your example XML.

                1.      On the section where you define these fields, add a new field and name it like this:

                ~DALRUN MyJust.Dal
                The first part of the name must be ~DALRUN with the tilde at the start, no space, the word DALRUN, followed by a space, followed by any text that names a DAL script or routine in your library. This defines what I call a “macro” field that will essentially run this DAL script any time it tries to display or attempts to print this field.

                2.      This step could be important if trying to automate this import in a way that means you won’t actually visit the page in the display. After creating the field, click on the Objects tab, so that you can see the list of fields. Click-drag your new field higher above the first field in the list that will be justified. There is also a “Move Up” icon on the button bar that will move the field one step at a time, if you prefer.

                3.      Return to the Properties tab. Set the length to 1 and check the box that says “No User Edit”. You may not actually have to do this no-edit checkbox, but there’s no harm in doing so.

                4.      Now, check this section into the library.

                5.      Over in the Workspace list, right-click on the Triggers entry and choose New. (If you know how to make script routines in a library and already have a library you are using, then you can simply edit that one and make a new routine with the appropriate name.)

                6.      Name the new script/routine the same as you identified on the field. My example would be:  MyJust

                7.      The script then would contain a series of justifications for the fields involved. I’ll assume that you have already aligned the right-edges of the fields the way you want and only need a simple right-justification. Therefore, my script would look like this:


                     JUSTFIELD("R", , ,"SettlementItem")
                JUSTFIELD("R", , ,"Quantity")
                JUSTFIELD("R", , ,"UnitPrice")
                JUSTFIELD("R", , ,"Amount")


                8.      Since you don’t intend to display anything on the macro field, I don’t think you need a return value of any kind. If you are not familiar with the DAL JustField() function, the first ‘R’ means you want right justification. The next 3 commas skip over two parameters that are not being used. The fourth parameter then is the name of the field that you are justifying.

                9.      Now save and check your script back into the library and you are ready to test.


                This doesn’t technically align the fields on import, but the first time the form page displays or any time the form page tries to print, this justification should be done and provide your results. If it is possible that your users don’t always import this data and sometimes do manual entry, you may also want to add a JUSTFIELD("R") into the script Calc property for each field as well. Be sure that the script is set to run only on “This Field” and not “All Fields” as that would be a waste. Also note, that when you are justifying the field being edited by the user, you don’t actually have to supply the field’s name as a parameter as DAL assumes you mean the ‘current’ field the user just completed.


                Good luck.


                Message was edited by: user9976634 (clarification on describing ~DALRUN)

                • 5. Re: Documaker Embedded Fields Error

                  Hi! Thanks so much! It works. I'll try to raise the bug with my Manager so we can work something out.