SP GetListItems WebService - InfoPath Dev
in

InfoPath Dev

SP GetListItems WebService

Last post 08-03-2006 12:22 AM by liorlankri. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-03-2006 12:22 AM

    SP GetListItems WebService

    I have an InfoPath Form. I have this code (c#):

    public void IdNumber_OnAfterChange(DataDOMEvent e)
    {

    if (e.IsUndoRedo)
    { return;
    }
    if (e.Operation=="Delete")
    { return;
    }


    XmlDocument xmlDoc = new System.Xml.XmlDocument();
    XmlNode ndQuery = xmlDoc.CreateNode
    (XmlNodeType.Element,"Query","");
    XmlNode ndViewFields = xmlDoc.CreateNode (XmlNodeType.Element,"ViewFields","");
    XmlNode ndQueryOptions = xmlDoc.CreateNode(XmlNodeType.Element,"QueryOptions","");


    string str=e.NewValue.ToString();

    ndQueryOptions.InnerXml
    = "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>" +
    "<DateInUtc>TRUE</DateInUtc>";



    ndQuery.InnerXml="<Where><Eq><FieldRef Name='IdNumber'/><Value Type='Text'>"+str+"</Value></Eq></Where>";



    try
    {
    XmlNode returnXml = WS.GetListItems("FormsFolder",null,ndQuery,null,null,ndQueryOptions);
    }
    }
    This is the code. I get error that the field with this name not found!!
    That's mean that the field name "IdNumber" not fount in the SharePoint list.
    Why it not found it? I know that I nedd to replace the field name with somthing else. How to do it?
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.