Get the Required Field Element in orchetsration

My input instance is as follows:
<ns0:Students xmlns:ns0="http://CallTemplate_Increment.StudentSchema">
  <StudentTransactions>
    <ID>100</ID>
<RowIndicator>H</RowIndicator>
    <FName>Prakash</FName>
    <LName>Sajwan</LName>
    <ID_Detail/>
    <Cost/>
    <GL_String/>
  </StudentTransactions>
   <StudentTransactions>
    <ID/>
<RowIndicator>D</RowIndicator>
    <FName></FName>
    <LName></LName>
    <ID_Detail>100</ID_Detail>
    <Cost>200</Cost>
    <GL_String>300.890.830.777</GL_String>
  </StudentTransactions>
  <StudentTransactions>
    <ID/>
<RowIndicator>D</RowIndicator>
    <FName>D</FName>
    <LName></LName>
    <ID_Detail>100</ID_Detail>
    <Cost>200</Cost>
    <GL_String></GL_String>
  </StudentTransactions>
  <StudentTransactions>
    <ID/>
<RowIndicator>D</RowIndicator>
    <FName>D</FName>
    <LName></LName>
    <ID_Detail>100</ID_Detail>
    <Cost>100</Cost>
    <GL_String>300.890.830.777</GL_String>
  </StudentTransactions>
    <StudentTransactions>
    <ID>200</ID>
<RowIndicator>H</RowIndicator>
    <FName>Ramesh</FName>
    <LName>Rawat</LName>
    <ID_Detail/>
    <Cost/>
    <GL_String/>
  </StudentTransactions>
   <StudentTransactions>
    <ID/>
<RowIndicator>D</RowIndicator>
    <FName>D</FName>
    <LName/>
    <ID_Detail>200</ID_Detail>
    <Cost>700</Cost>
    <GL_String>500.890.830.777</GL_String>
  </StudentTransactions>
  <StudentTransactions>
    <ID/>
<RowIndicator>D</RowIndicator>
    <FName>D</FName>
    <LName/>
    <ID_Detail>200</ID_Detail>
    <Cost>900</Cost>
    <GL_String>500.890.830.777</GL_String>
  </StudentTransactions>
</ns0:Students>
If RowIndicator is H then required field is RowIndicator,FName,ID.
IF RowIndicator is D then required field is RowIndicator, ID_Detail,Cost,GL_String.
Now if any required field  is empty then store the name of these Elements in a file  and send this file in the attachment in mail.And how can I uniquely identify that these information is for particular student.
H stands for header and D stands for details.
One Record (which RowIndicator is  H) belongs to other record (which RowIndicator is D) only when ID of 
record (which RowIndicator is  H) equals to ID_Details of record(which RowIndicator is D).
Any Help would be appreciated.I want to do it orchestration after getting the message by calling a c# function. I have written the attachment function for sending mail.I just want to put those information in a file.
Prakash

In Orchestration, you can call a helper method as the following, where you can apply the validation log and either constructs a XML-Message with error details or a simple error string message with error details appended which you can pass to your email program
and send email.
public static string ContractValidationMsg(XmlDocument xmlInput)
string sErrorMessage = String.Empty;
//Get the HeaderID
XmlNodeList headerNodes = xmlInput.SelectNodes("/*[local-name()='Students' and namespace-uri()='http://CallTemplate_Increment.StudentSchema']/*[local-name()='StudentTransactions' and namespace-uri()=''][RowIndicator='H']");
//Loop thur all the filtered header node
foreach (XmlNode headerNode in headerNodes)
string sHeaderID = headerNode.SelectSingleNode("/*[local-name()='Students' and namespace-uri()='http://CallTemplate_Increment.StudentSchema']/*[local-name()='StudentTransactions' and namespace-uri()='']/*[local-name()='ID' and namespace-uri()='']").InnerText;
//Get the DetailID for the filtered ErrorID
XmlNodeList detailNodes = xmlInput.SelectNodes("/*[local-name()='Students' and namespace-uri()='http://CallTemplate_Increment.StudentSchema']/*[local-name()='StudentTransactions' and namespace-uri()=''][RowIndicator='D'][ID_Detail='" + sHeaderID + "']");
//Loop thru the DetailID
foreach (XmlNode detailNode in detailNodes)
string sCost = detailNode.SelectSingleNode("Cost").InnerText;
//Check Cost in detail is empty, if so then construct the error message
if (sCost == String.Empty)
sErrorMessage +=sErrorMessage + " For HeaderID:" + sHeaderID + " , In its Detail node, value for Cost element is missing /n" ;
string sGL_String = detailNode.SelectSingleNode("GL_String").InnerText;
//Check GL_String in detail is empty, if so then append the error message
if (sGL_String == String.Empty)
sErrorMessage += sErrorMessage + " For HeaderID:" + sHeaderID + " , In its Detail node, value for GL_String element is missing /n";
return sErrorMessage;
This is just to give you an idea and you and fine-tune it to fit your requirement. The above code is a working code.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • Reading the required fields from a pdf document

    Hi all,
    My requirement is, How can i get the required field values from a scanned document which is in pdf format. Can anyone provide the idea how to approach this using Java.
    thank u all .

    function(){return A.apply(null,[this].concat($A(arguments)))}
    Scribby182 wrote:
    -How can I remove this function altogether?  There is no significance to the image filenames and I'd rather not have to ensure they all match the document text.
    I'm not aware of anyway to automatically remove them from the pdf file. You can manually remove each of them but it's always better to treat the source file than to treat the PDF file for changes.
    To keep from seeing them without having to remove them all in Word, just use the "print method" to create the PDF file. Print to the Adobe PDF printer rather than using the Save as Adobe PDF feature.
    Regards,
    Joe

  • How to Find out the from which table we can get the following fields?

    The following fields are from invoice data
    How to  know or from which table we get the following fields:
    Header Details:
    Manifest:, Finance Control #:, Alternate SID:, Carrier:, Container/Trailer #:, Hazmat Code:, Harmonizing Code, Freight Forwarder, Fiscal Rep., Ship From,  Notify Party
    Item Details:
    VAT/Tax Rate %, VAT/Tax Amount, Measurements, Net Weight, Gross Weight
    thanks

    Dear Krishnama
    Place your mouse on the required fields and press F1.  A box with header Performance Assistant will appear in front of you where you select "Technical information" (icon like hammer and spanner). 
    You can now see what table it is.
    thanks
    G. Lakshmipathi

  • How to get the number of elements in DB

    Could you tell me how to get the number of elements in DB??
    My code to get the number is below, but I think it is not efficient
    DB->cursor(DB, NULL, &cursorp, 0);
    while ((ret = cursorp->c_get(cursorp, &key, &data, DB_NEXT)) == 0)
    count++;
    --------------------------------------------------------------------------------------------------------------

    Hi,
    The most efficient way to get a count from the database is using the DB->stat API (http://docs.oracle.com/cd/E17076_02/html/api_reference/C/dbstat.html)
    The code will be something like:
            DB *dbp;
            DB_BTREE_STAT *statp;
            int ret;
            /* Print out the number of records in the database. */
            if ((ret = dbp->stat(dbp, NULL, &statp, 0)) != 0) {
                    dbp->err(dbp, ret, "DB->stat");
                    goto err1;
            printf("%s: database contains %lu records\n",
                progname, (u_long)statp->bt_ndata);
            free(statp);The code comes from the example included in the distribution at examples/c/ex_btrec.c
    If the database isn't a btree, you should update to the appropriate statistics structure and field.
    It's worth noting that retrieving the count is never a "cheap" operation. The count is not stored in the database - since doing so introduced a single point of contention that creates a bottle neck.
    Regards,
    Alex Gorrod
    Oracle Berkeley DB

  • "iTunes can not run because some of the required fields are missing.  Please reinstall iTunes."  What the ****?!

    "iTunes can not run because some of the required fields are missing.  Please reinstall iTunes."  What the ****?  Please help me figure this out.  I already removed quicktime (as another thread suggested).  I can't get in!

    i get same error.
    I have uninstalled and reinstalled more times than i care to count. but still i get
    itunes cannot run because some of its required files are missing.

  • Getting the required property of an item in a bean

    Hello all,
    is it possible to get the required property of e.g. a VTextField inside a PJC?
    I am trying to write a bean that iterates through all the components of a form a puts a red border on all fields marked as required in Forms. I cannot find an appropriate getter or ID to use with the getProperty(ID) method.
    Any help is appreciated
    Achim

    There is already a functionality which makrs all required fields:
    Open the file $ORACLE_HOME\forms\java\oracle\forms\registryregistry.dat with a texteditor
    At the end of the file you'll find two entries
    app.ui.requiredFieldVA=false
    #    The background color is specified as an RGB triple.
    app.ui.requiredFieldVABGColor=255,0,0Set the first one to true and the second one to a color of your choice, restart OC4J and check the results, maybe it fits your requirement.

  • How to block the 'save' function when the required fields are not filled?

    Hello, Everyone
    I am new for this scripting. My question is:
    How to block the 'save' function when the required fields are not filled?
    I designed a PDF file with some required fields and I do not want the user to save the document until all required fields are filled. My idea is to write some scripts in Willsave method like:
    if (this.getField("Family Name").value == ""){
    app.alert('You should fill the Family Name field firstly!');
    But I do not think it works as finally the document is saved after all.
    Please help me on that!
    So much thanks.

    Dear Randybearwang,
    I am a Rocky myself and I know how though it is to establish some good codes. Since I created some forms with validation options myself I might have a code for you. The code also creates an alert box (Yes/no option) if the user chooses yes the form will be validatet, if he chooses "no" the alert window will be closed.If  everything is filled out correctly the form will be saved otherwise the textbox will be higlighted and gets focus.
    If you need further assistance , please let me know
    Have fun with the code.
    P.s I don´t know how to upload the "PDF" document. I wrote you an email, please get back to me if you still need the file.

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • How to get the number of elements in a tilelist

    I'm writing test cases for a flex application using FlexSelenium and I need to get the number of elements displayed in the tilelist.
    I know that that the tilelist is fed by an array. but i can't access that array from my test case.
    Can anyone tell me how I can get the number of elements in a tilelist on the application? which property of the tilelist can provide that number?

    try tileList.dataProvider.length;

  • How to setup a function is cannot print out if didn't fill up all the required field on PDF form?

    how to setup a function is cannot print out if didn't fill up all the required field on PDF form?

    No way with just the free Reader. It may be done with Adobe Acrobat.

  • How to get the current tree element (node/childnode/childnode/...) ?

    Hello!
    I'm trying to create a kind of a navigation tree for my application.
    It should represent some elements of an XML structure and some other nodes for other options.
    The binding with the context is not a problem, I can create the tree up to all the levels I want to.
    The problem now is, that I don't know, how to get the "current tree element", when there is any action.
    For example:
    public void onActionSelect(...) {
    String test = wdContext.currentTreeNodeElement().getText();
    wdThis.wdGetContext().currentContextElement().setSelectedElement(test);
    With this method I can get the text of the "first level nodes". If I want to get the "second level node", I can do
    String test = wdContext.currentTreeNodeElement().currentChildElement.getText();
    ..and for the next levels so on.
    Isn't there any general method to get the information of the selected element without knowing before, whether it is a nodeElement or a nodeElement.currentChildElement or a nodeElement.currentChildElement.currentChildElement, ...?
    Greetings,
    Ramó

    Hi,
    if you following that pdf ,
    i think your not implemented the below code in DomodifyView method
    if (firstTime) {
          IWDTreeNodeType treeNode = (IWDTreeNodeType) view.getElement("TheNode");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "selectedElement".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onAction event. Parameter "selectedElement" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onAction. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnAction().addSourceMapping("path", "selectedElement");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "element".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onLoadChildren event. Parameter "element" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onLoadChildren. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnLoadChildren().addSourceMapping("path", "element");
    please cross check once.
    Thanks,
    Ramesh

  • How to get the current node element by its value?

    e.g,:
    wdContext.current<b>Deal</b>Element().setAttributeValue("<i>deal_id</i>","<i>aaaaaaa</i>");
    above code can get the result i wanna.
    but now i wanna in terms of its node'name to  set attribute vaue of itself. in other words,i have no idea about how to get the current node element by its name"<b>Deal</b>".

    Hi Wing,
    The answer is there in your question itself.
    wdContext.currentDealElement()
    will give you the current node element by its name"Deal" or you could use
    wdContext.nodeDeal().getCurrentElement()
    or you could use
    wdContext.nodeDeal().getElementAt(wdContext.nodeDeal().getLeadSelection())
    Regards,
    Sudeep

  • Name of the table where can get the two fields Valid-From and Valid-to for

    Hi gurus
    I want name of the table where I can get the two fields Valid-From and Valid-To and their relation ship with the header table in BOM
    Regards
    Kaisar

    You can only get the Valid from date from the table STKO.
    To get the valid to date, you have to take one day less than the valid-from date of the next record for the same BOM.
    Alternatively use the Function module:
    CSAP_MAT_BOM_READ
    It will give both valid from and valid to dates in the tables parameter: T_STKO
    Regards,
    Ravi
    Edited by: Ravi Kanth Talagana on Jul 2, 2008 4:37 PM

  • Get the custom fields data at the time of save

    Hi,
    We have added few fields in the ICWC for the complaint screen.
    At the time of save i am trigering a BADI.
    I would like to check the data that is entered in those fields of complaint screen.
    Is there any FM which can be used to get the data from the buffer ?
    I have the header GUID available to me .
    Thanks.
    R

    Hi,
    Let me elaborate a bit.
    Users would create the complaints in the ICWC.We have addeded few custom fields in the complaint screen.
    CRMT_CUSTOMER_H_WRKT is extended with the custom fields.
    At the save i am trigerring the Partner Determination BAdi.
    Here i have the complaint guid at run time.
    I would like to check the data entered in the custom field in the complaint screen. Based on this i would like to determine one more partner.
    My question is how can i get the custom field data in the complaint screen in this BAdi.
    The FM:  CRM_ORDER_READ is not returning this data.Is there any FM to get this ?
    Thanks.
    R.

  • How to fix problem of bypassing the submit button validation by pressing the space bar in the required fields. this occurrs in the internet explorer and chrome browser, but in foxfire.

    How to fix problem of bypassing the submit button validation by pressing the space bar in the required fields. This occurs in the internet explorer and chrome browse but not in foxfire

    How to fix problem of bypassing the submit button validation by pressing the space bar in the required fields. This occurs in the internet explorer and chrome browse but not in foxfire

Maybe you are looking for

  • Can't acces AFP shares on PPC's on specific server

    We have a naughty problem at the office for accessing shared folders . We use G5 Xserve + Xraid serving home access to 12 macs. Our problem started when we updated all machines to 10.5.2 (nor did we have a problem with 10.5.1 or with 10.5.0). All mac

  • Post-change trigger problem

    I have problem with post-change trigger, i'm using Forms 10g I have two block, one is database block and the other is non-database block for example A is Nondatabase block and B is Database block, I have written commit_form built-in in Key-Next-Item

  • JFileChooser in Applet keeps focus after selection of a directory

    I have spent several days on the following issue, but haven't found any solution so far... When I open a JFileChooser out of an Applet and select a Directory, the FileChooser closes as expected, but a text field located on the main applet pane cannot

  • Old email on dialogue box for app store, can't access

    Hi, I've changed my email address and it's been verified.  I've logged out of facebook and closed mail off, turned phone off BUT STILL THE DIALOGUE BOX has my OLD email and obviously won't accept the password.  So frustrating, I can't update anything

  • Missing file names

    Hi! The file names are missing, when I view my "site" (F8). What's the reason for that? Thanks! Niko