XMLFIND in DAL script

Hello,
I have some problems with the xmlfind function in the DAL scripts.  Gendata crashes every time i run and i have tried several different combinations of xml find:
This is a part of the xml file:
<activities>
            <activitiesList>
                <code>801240</code>
                <secondActivity>football</secondActivity>
                <name>John</name>
            </activitiesList>
            <activitiesList>
                <code>801116</code>
                <secondActivity>basketball</secondActivity>
                <name>Adam</name>
            </activitiesList>
            <activitiesList>
                <code>801410</code>
                <secondActivity>shotput</secondActivity>
                <name>Claire</name>
            </activitiesList>
        </activities>
XMLFIND:
%listH = LoadXMLlist("activities.xml");
%textList = xmlfind (%listH,"activities","activitiesList");
I used isxmlerror to check if %listH is valid and it did return 1.  my problem is with xmlfind and gendata crashing before any error message can be displayed.  I would appreciate any help regarding this issue. 
Thank you.
P.S. I read through the DAL_book.  nothing helped.

Actually, I'm thinking that the IsXMLError() function is documented incorrectly. If you look at the help on the item, you see:
This function returns one (1) if there no errors occur or zero (0) if errors do occur.
%xListH=LoadXMLList("test.xml");
If (IsXMLError(%xListH)) Then
  return ("Error");
EndIf
return(aStr);
The example is at odds with the description. I believe the example is correct. A non-zero return from IsXMLError() means there was either an error or the parameter name you passed is not a valid xml list variable. If there is no error on the list variable, then the function will return 0.

Similar Messages

  • What is the use of # in DAL script ?

    Hi Guys,
    In DAL script what is the use of # ? When I am not putting # the keywords are looking blue (Which I think its correct) but in the Help it mentioned with #. If I am putting # in the code then it became grey colour. Which one is the correct ?
    Thanks,
    Bikas

    Hi Bikas,
    # is used to validate numeric values. Please find the sample below.
    Scenario 1_:
    X = Getdata("!/xyz 1,10")
    X may take alphanueric values
    Scenario 2_:
    #X = Getdata("!/xyz 1,10")
    #X will only take numeric values.
    Based on your requirement you can use # accordingly.
    Please let me know if any information required.
    Thanks,
    Sravanthi M.

  • Documaker :How to dynamically move or resize a section using DAL Script?

    Hi all
         i am a newbie to Documaker. I am working with Documaker 11.4. I would like to know two things
            (1)   Whether there is any option to move a section towards left, dynamically using DAL Script.
            (2)   And is there any option to resize the section dynamically using DAL Script.
    Thanks in advance.

    This is obviously a bug with Photoshop Elements 12.
    In my Photoshop Elements 10 the printer dialogue box scales to fit the screen every time.
    In Photoshop Elements 12, even moving the task bar away (you can simply drag it up the right hand side of your screen with the mouse) you can't see the print button as its still off the bottom of the screen.
    My work around is to hold shift+alt+cntl and click on my Ps icon - Click compatibility - Scroll  down to settings - click run in 640 x 480 screen resolution. It then does horrible things to your screen res, but hey presto the printer dialogue box is minimised and you can print your picture. As with your Toshiba, even with the printer dialogue box fully exposed there are no chevrons in the bottom right hand corner to minimise the printer dialogue window and the arrow buttons simply start trying to change the settings in the printer set up. The dialogue box is still nailed to the top of the screen with no title bar to right click on.
    How do I escalate this to report it as a bug to Adobe?

  • How to parse and use the data that is coming as XML using DAL script

    Hi,
    I am trying to implement a solution where we are getting a doPublish request using EWPS webservice call which just contains a transaction id. I need to read a table using transaction id to get the xml. I know how to read the xpath and implement the solution if the XML is coming as input. If it stored on a table where Documaker should read and get the XML, how can we implement that?

    If you are saying that your XML is stored in a table, I'm not sure there is any method, using DAL or rule, that would know how to load XML from there. I can be wrong, but I think it has to load the XML from disk only - either as the extract file or as an external file referenced from the extract - using a Rule or DAL to go after the external file.
    Perhaps you could clarify the situation a little more and someone might offer a suggestion.

  • Can't find new DAL Library in DM Studio

    Hey folks,
    I have a few different projects that are all part of the same MRL. Up until now they've all used the default SETRCPTB DAL library for triggers. But I'm working on a new project, still in the same MRL, that I'm creating a new DAL library to hold this project's triggers in. However, when I'm working in the form, and decide to add a trigger to a section, when I click on the drop down box, all I get are the triggers from SETRCPTB, not my new library.
    I'm guessing I have something wrong in my FSIUSER INI file, but I can't seem to find/fix it. The only documentation I've found seems to point to the FormSetTrigger attribute in the CONFIG section, so I put my DAL library name there, but it didn't fix the problem.
    Can anybody tell me where to put my DAL library name so in DM Studio it pulls in the automatic triggers I've coded in that new library? Also, are there other places where I need to put it, or make sure I don't have a different value that could be overriding my desired value?
    Thanks in advance,
    Gregg
    In case it matters, I'm running 11.5 P04 DM Studio.

    Update:
    I did a line by line compare between the FSIUSER.ini that worked (gave me the non-"SETRCPTB" dal scripts in DM Studio in the Trigger options drop down list when attaching a trigger to a section on a form), and one I was working on that I couldn't get to work (give me the non-SETRCPTB dal library I wanted). The one line that came up different was that in the MASTERRESOURCE group, I was missing the attribute "FormsetTrigger". I am pasting an abbreviated version of my FSIUSER that gives gives me the DAL library I want (and ONLY the scripts in that library, not a combination of SETRCPTB and another library), in place of the default SETRCPTB (of that MRL), to choose from in DM Studio:
    < CONFIGURATIONS >
    CONFIG = GRPBILL
    < CONFIG:GRPBILL >
    FormsetTrigger = GRPBILL_SCRIPTS
    < MasterResource >
    FormsetTrigger = <CONFIG:GRPBILL> FormsetTrigger =
    Thanks for your guys' attempt to help ;^)
    Gregg

  • Ondemand Script is failing in oracle documaker 12.2

    We just upgraded from oracle documaker 11.3 to 12.2. When we try to generate AFP file, ondemand script is failing in 12.2. It is failing in Gen print.
    GenPrint
    Transaction Error Report - System timestamp: fri sep 26 09:24:12 2014
    DM17115:  Warning : The DownLoadFAP INI option is set to YES, this option should be set to NO for optimal performance. Check the RunMode control group, DownLoadFAP option.
    DM17065:  Warning in GENGetRecipientSet(): AGENT batch is empty, Unable to RCBGetFirstRcpSetRec(NULL).
    DM17065:  Warning in GENGetRecipientSet(): ERROR batch is empty, Unable to RCBGetFirstRcpSetRec(NULL).
    DM12041:  Error : FAP library error: Transaction:<>, area:<..\C\rulcomnt.c,Aug  8 2013 19:10:48,12,2,0,21451>
              code1:<0>, code2:<0>
              message:<Script: DEFLIB\LOADONDEMAND.DAL
    Line: 10  Col: 642  Err: 65535  Token: )  Msg: Unknown>.
    ULL).
    DM12041:  Error : FAP library error: Transaction:<>, area:<..\C\rulcomnt.c,Aug  8 2013 19:10:48,12,2,0,21451>
              code1:<0>, code2:<0>
              message:<Script: DEFLIB\LOADONDEMAND.DAL
    Line: 10  Col: 642  Err: 65535  Token: )  Msg: Unknown>.
    ==> Warning  count:    6
    ==> Error    count:    2
    End of Transaction Error Report - System timestamp: fri sep 26 09:24:13 2014
    Elapsed Time: 1 seconds

    This appears to be telling you that there is a DAL script error. There's probably some syntax error not previously detected in the script that is now being reported. The script execution is not able to tell whether LOADONDEMAND is really the name of a script or a routine found within a script library, but that is where the error is located.
    Perhaps you can bring that script up in DMStudio and do a syntax check from the menu/ribbon. That might help you recognize what needs to be corrected.
    Line 10, column 642 would mean that it is a really long line! Might mean there is just a paren out of place or not enough to satisfy the syntax.

  • Use of GVM's in POSTTRANS DAL

    Hi everyone,
    We are having an issue getting GVM's to be accessible to the POSTTRANS.dal script. HAVEGVM is showing the GVM exists, but the values come in blank.
    Is an .ini setting that controls this?  Does the ordering of the POSTTRANS dal in the AFGJOB matter here?
    If the ordering does matter, is there a good way to troubleshoot?
    Any help or suggestions regarding this issue are greatly appreciated.
    Thanks in advance,
    Eric Greene

    Okay. That probably means that the script did not provide enough information to clarify where to find your field in the document. DAL has the concept of the "current section" and "current field". So, when you call it from a field rule, it would assume that is the current field and the section that owns the field is the current section. When you call it in a Post trans DAL, the system will assign the first section in the document as the "current" section. So, your field is being sought on that section and is failing.
    So, you need to provide enough information to locate the field. The @() supports you specifying the section, form, and forms list. The amount you have to specify depends upon what best identifies the specific field you want.
    If you know your field is uniquely named in the entire document, you could do something like this:
    x = @("FieldName", , , "*");
    This says to find the first (and only?) occurrence of the named field within any form list (GRP) specified. That's pretty broad, but you may be able to be more specific.
    x = @("FieldName", "Section", "Form", "FormList");
    If you specify an asterisk, this means "ANY" within the parent. so x = @("FieldName", , "*") means to find the field within "any" form within the current forms list.
    x = @("FieldName", "*") would mean to find the field on any section within the current form (which in this case would be the first form in the transaction).
    There may be better examples in the DAL help for the getfld (@) function, so perhaps reviewing that would be better than what I've done here.

  • Integer DAL Variable in 11.5

    In 11.5 Studio Patch 3 I am experiencing an issue with integer variables inside of a DAL script.
    It seems that when I define an integer variable (starting with the # character) the interpreter is not recognizing the line correctly. I entered the following lines into my DAL script window:
    #LOB = CountRec("17,PMSP0000 50,CPP");
    $LOB = CountRec("17,PMSP0000 50,CPP");
    %LOB = CountRec("17,PMSP0000 50,CPP");
    LOB = CountRec("17,PMSP0000 50,CPP");
    The #LOB line is all in blue (even the values between quotes)
    All of the other lines are color coded correctly with the the variable name in black, CountRec rule in blue, and the "17,PMSP0000 50,CPP" appearing in red.
    I have also tried other variable names, but any line starting with # displays in all blue.
    Has anyone else encountered this problem and know if it has further ramifications in processing?
    Blanchard Williams
    CSC

    The person having the problem (I was assisting so don't have access to the exact environment) is saying that the script is not working. The form being triggered does not produce even through the values are present. I think there is another issue related to how the IF statements are being recognized by Studio, but I didn't want to muddle this potential issue with another. I have some testing suggestions for her, but wanted to see if anyone had run across proof that the color coding issue is, or is not, an indication of a real problem.
    Thanks.

  • Can I use SetFld during GenPrint for banner page fields?

    I have a banner page form that has multiple variable fields on it to display information specific to the batch it's being included with (for out post-composition handling area). I currently set those fields' values by assigning variables of the same name (as the fields) within a DAL script called as my BachBannerBeginScript for that batch. The fields on the Banner page form/section have a rule of NOOPFUNC, so without that assign process happening during the DAL script, they inherently hold no value. This has worked fine so far.
    Now I have a new banner page for a different process/batch, and it's purpose will be to be a "summary report" of sorts, detailing on the banner page high-level information about each document within that batch. I take information from the batch file (bch), read in an additional external file and aggregate the data in GVMs (to form an array, basically) during the BatchBannerBeginScript. The problem I now have is that I have a variable-sized array (based on the document-count within my batch file), yet my understanding is that I can't use functions available to me in GenData, so I have to basically pre-define as many instances of the section (if I do a report line per section) or field (if I do one section with all instances of the field on it) as I think are possible (max-case scenario, basically).
    However, after I have my Section/Fields defined, I still need to use DAL scripting to populate those fields. I tried to use SetFld to populate them, but the values don't show up in my output, leading me to believe that function/rule doesn't work in GenPrint. Is there a better way to set all those fields than to explicitly assign each instance of a field? I'd rather have a short While loop that takes a GVM's instance and assigns it to a variable field name than have hundreds of assign statements where I explicitly assign each possible field.
    Thanks,
    Gregg

    Aha. So you have an existing script that is executing somewhere to assign some other field during print. Depending upon what and when this script runs, you may be trying to set your banner fields too late. You see, as a default the banner page is temporary. Generally it is created, printed, then destroyed all before the first real page of your transaction prints. If you are not using the TransBannerBeginScript INI option as mentioned earlier, you might try to use that method to run your script which should be while the banner page is still alive.
    There is another way that you could try to run your script on the given page using what is called a "print time" or "macro" field. This would involve creating one more field on your banner section and name it like this:
    ~DALRUN MyScript.DAL
    Yes, you can name your script something other than MyScript.DAL.  The key is the ~DALRUN at the start, which will be interpreted at print time to mean that you want to run the DAL script and return a value. Now, of course you don't need a real value for this field, but there's nothing to stop the script from assigning data into the other fields at that time.
    You do have to make sure that this field is the first in sequence on the section. Otherwise, some of your fields may print before it gets to the point to evaluate this "print time" request.
    To make sure this is the first field in sequence will differ depending upon whether you are using DMStudio or the older Image Editor. Since you mentioned 11.5,  you could use either. In DMStudio, simply click on the "Objects" tab when the section is open and then click on the field to highlight it in the tree. Then use the button bar just above there to move the field to the top of the list.

  • Populate a field on each page of formset without making formlevel changes

    Is there any rule that can control at a master level, the population of a certain value from the flat-file extract on all pages of the formset?
    There is a huge number of forms that need to be populated with the value from the extract without making changes to the forms. The field might have to be positioned similar to a footer field.
    Is there any transaction level rule that can be used within the afgjob.jdt to serve this purpose?

    859317 wrote:
    Is there any rule that can control at a master level, the population of a certain value from the flat-file extract on all pages of the formset?
    There is a huge number of forms that need to be populated with the value from the extract without making changes to the forms. The field might have to be positioned similar to a footer field.
    Is there any transaction level rule that can be used within the afgjob.jdt to serve this purpose?If you already have a field on all the pages of the formset, you need only set the scope of the field to global and then populate the value once - it will then be populated for all occurrences of that field in the formset. If you do not already have the field on the components of the formset then your work will be a little more difficult - you will have to create an overlay section that contains the field, set the field scope to global and populate, then add the overlay section to all the forms (you can do this via a DAL script so you don't need to edit all the forms, but you will have to touch them to at least add the DAL).
    -Andy

  • Date and Time stamp for the archives

    Hi,
    I'm trying to set up a date/time stamp field for a Documaker archive.
    I've added a TIME_STAMP field in my APPIDX.DFD and I populate the field using a DAL script, invoked by a PreTransDAL line in my AFGJOB file. That works fine but, the DAL script being invoked for every transaction, it adds to the processing time.
    I do not need an exact date/time stamp for each transaction in the batch, I could use the same one for all the transactions. That would require the TIME_STAMP global variable to be populated once, at the job level, at the beginning of each batch.
    Any suggestions?
    Thanks.

    Hi Gaetan,
    Try using a BatchBannerBeginScript to populate a GVM with the date/time, and then reference this GVM in your APPIDX.DFD. In this manner the value will be updated at the start of processing for each batch rather than each transaction. Or, consider the possibility of adding the transaction date/time into the extract data and then sourcing from that point. Either should work. In my experience most customers prefer that the archive date/time come from the system of record rather than the time the transaction was archived -- unless of course the customer actually wants to record the time the transaction was archived, in which case the method I've described above should work.
    Enjoy!
    Andy

  • Multiple PDF Files

    Hi,
    I am new to Documaker. I got the initial setup done and am able to generate a single PDF file from an XML. In our system, each XML file corresponds to each PDF generated. I am just wondering how to set the INI file for accepting Multiple XML input files and generates Multiple output PDF files. Also, is there anyway to name the generated PDF files from some DAL script or assign any sequence to it.
    Thanks
    Raza

    877669 wrote:
    Hi,
    I am new to Documaker. I got the initial setup done and am able to generate a single PDF file from an XML. In our system, each XML file corresponds to each PDF generated. I am just wondering how to set the INI file for accepting Multiple XML input files and generates Multiple output PDF files. Also, is there anyway to name the generated PDF files from some DAL script or assign any sequence to it.
    Thanks
    RazaHi Raza,
    Please reference the documentation Using the PDF Print Driver for your particular version of Documaker. See the section entitled Setting up the PDF Print Driver and subsection Using the PDF Print Driver with Genprint.
    You can set up the print driver in a number of ways, depending on what you're trying to achieve in your output:
    - If you can have multiple transactions in your XML file and want to generate a PDF for each transaction, use the MultiFilePrint option.
    - If you can have only one transaction in your XML file, you don't need to do anything different - just configure the print driver as shown.
    - If you can have multiple transactions in your XML file, and you want to generate a single PDF containing all transactions, see the sub section Generating a Single PDF
    You also mentioned the configuration for accepting multiple XML input files - see the documentation Working with XML Files your for particular version of Documaker. See the section Using XML Extract Files. In particular you'll want to use the rule XMLFileExtract, which assumes that your input to Documaker is a flat file list which contains the filenames of the XML extract files you want to use. Your other option is to concatenate all the XML files into a single file (note that this includes concatenating the XML headers, which means this concatenated file will become an invalid XML file, but that is ok). If the latter option is what you're using, then you want to use the UseXMLExtract rule. For more information on the setup, see the Documaker Rule documentation for each rule.
    If I am correct in my assumption that you have one transaction in your XML file, you will probably be using the XMLFileExtract rule in conjunction with the MultiFilePrint option.
    For overriding the PDF file naming convention you can use the DAL in-line function as shown in the Generating a Single PDF section. The example illustrates how you would insert the value of a variable into the file name.
    < BatchPrint >
    PDF = ~HEXTIME .PDF
    In this case, the variable HEXTIME is preceded by a ~, and is followed by a space. You can use multiple variables - e.g. +~KEY1 ~KEY2 ~KEYID ~HEXTIME .PDF+, just make sure you follow each variable with a space. The system includes a number of built-in variables, but you can reference any variable that you've created as a transactional or global GVM.
    Hope this helps. If you need further clarification please respond.
    -Andy
    Edited by: Andy Little on Aug 9, 2011 3:32 PM

  • Creating pdf from batch print i n 11.3

    What changes are needed in genprint, jcl, etc. to print to pdf files?

    If you wish to use a DAL script this sample will return a PDF filename containing the policynumber, a date and time stamp and a counter. This was necessary as the extract file may have contained multiple transactions with the same policy numbers. It would probable be wise to expand the logic to dynamically assign a name where the policynum GVM was not found.
    IF (HAVEGVM("policynum"))
    IF (HAVEGVM("CTR"))
    CT = GVM("CTR")
    ELSE
    CT = 1
    SETGVM("CTR","1",,"S",6)
    END
    PN = GVM("policynum") & "-"
    TD = SUB(DATE(),7,4) & SUB(DATE(),1,2) & SUB(DATE(),4,2)
    TM = SUB(TIME(),1,2) & SUB(TIME(),4,2) & SUB(TIME(),7,2)
    PNAME = "baddebt-" & PN & "baddebt-" & TD & "-" & TM & "-" & CT & ".pdf"
    CT = CT + 1
    SETGVM("CTR",CT,,"S",6)
    RETURN (PNAME)
    ELSE
    RETURN ("NOP1.PDF")
    END

  • XML Boolean Operators in fsiuser

    Hi All,
    We define BatchingByRecip batches in our fsiuser file, and we often write custom XPATH statements to use input data to send certain transactions to a certain recipient group. We've had good luck with very simple XPATH statements, such as:
    Batch_Recip_Def = !/Transaction/Confirm/CompanyInfo[CompanyCode='0002'];"BatchGroup1";Client
    However, we've recently had some requirements to add multiple conditions to these XPATH statements, and we haven't been able to get boolean operators to work. We're trying to do something like this:
    Batch_Recip_Def = !/Transaction/Confirm/CompanyInfo[((CompanyCode= '0001' or CompanyCode = '0003'))];"MINNESOTA";Client
    This seems like a reasonable requirement, but we haven't been able to get this to behave correctly. Has anyone been successful with something like this? Thanks for any help!

    You can mix DAL usage with this sort of rule like this:
    < BatchingByRecip >
    Batch_Recip_Def = =DAL("My_Script"); ... ; ...
    Basically, most places that accept a search mask of ?token or typically the xpath starting with ! will also accept the =DAL() or =GVM() type macro call. The "=" macro feature has a number of options like:
    =(expression) returns the value of a DAL symbol represented by "expression"
    =DAL(expression) returns the value of a DAL script named by "expression"
    =GVM(expression) returns the value of a GVM symbol named by the expression
    =@(expression) returns the value of a source field
    So, in the DAL script you can do whatever you need to do - write a complex IF with as many XPATHs as you need connected with AND or OR, etc, and be sure to return "TRUE" if you want this batch.
    Not sure how far back the equal sign macro feature goes, so if not in 11.3, my apologies in advance.

  • Documaker : How to set the overflow repeated 3 times always.

    Hi Experts,
    I have 3 forms as follows.
    1. FormA (contains Subform1)
    2. Subform1 (contains Subform2)
    3. Subform2
    Subform1 on FormA is setting the overflow with the trigger by the XML.
    Search Mask (counter) : !/xxx/data/Repeats/Repeat
    I want to output always 3 times Subform2 on Subform1.
    I tried to set the trigger "ALWAYS" and '3' at "Records per overflow Section", but the setting is not working.
    Can I set to repeat the number of times that I specify always?
    Thanks,

    Hi,
    Here's one option:
    1. Create a new DAL script called "REPEAT_3_TIMES" and add it to your existing DAL library. The DAL SCRIPT should consist of one line: "RETURN(3);"
    2. Add a single trigger (yellow) on Subform2 and change the trigger name from "ALWAYS" to "REPEAT_3_TIMES", the name of the DAL script you just created.
    3. Check-in your changes and run a unit test to see that Subform2 repeats exactly 3 times for every occurrence of Subform1.
    Good luck and let me know (if)/how it works out!
    Edited by: 1003412 on Apr 30, 2013 2:09 PM

Maybe you are looking for

  • Firefox closes "Save As" window on some web sites when downloading

    On some web sites, such as Scribd or PC World, Firefox will quickly force shut the "Save As" window when downloading. It happens so quickly that I barely have time to see the "Save As" window. The same web site on IE will not cause this to happen. I

  • When I plug any of my phones into the computer it does not connect.

    When I plug any of my phones into the computer it does not connect. I can hear a beep but that's it.  I checked all of my USB cords and the same results. Normally it would download my new pictures and start charging and that no longer happens. When I

  • How does one increase the y-axis (amplitude) of the audio tracks?

    How does one increase the y-axis (amplitude) of the audio tracks? My patient appears to have flatlined. I don't want to increase the gain, just the way the waveform looks on my monitor.

  • Question about changing code progammatically

    In our code base there are many pkgs, procedures, and functions that have an email in the exception block. This email needs to be removed/updated. Can these objects be updated in a loop? Would you use execute immediate to re-compile? Would a cursor b

  • Address Toolbar for the Mac?

    In Windows XP, there is an option on the taskbar to display an address toolbar. It is actually part of the taskbar. I love this option because I can easily type a url into the address area and quickly go to a web site. It even has a drop down menu th