Unable to fill out my form after ws call - InfoPath Dev
in

InfoPath Dev

Unable to fill out my form after ws call

Last post 08-10-2005 10:58 PM by Patrick Halstead. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-09-2005 06:46 AM

    Unable to fill out my form after ws call

    Hi,

    I use the form like a normal user (not in design mode)in fill out mode

    In my form I make a query in a webservice and after I copy all the result in the primary datasource. my code:


    IXMLDOMDocument2 oDomSearchHRG = (IXMLDOMDocument2)thisXDocument.GetDOM("getAV");
    oDomSearchHRG.setProperty("SelectionNamespaces", "xmlns:xsf=\"http://schemas.microsoft.com/office/infopath/2003/solutionDefinition\" xmlns:msxsl=\"urn:schemas-microsoft-com:xslt\" ,.. ,.. ,,..");
    oDomSearchHRG.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:getAV/tns:nr").text= thisXDocument.DOM.selectSingleNode("/CaseList/Case/@Nr").text;
    thisXDocument.DataObjects["getAV"].Query();
    IXMLDOMNode oNode = oDomSearchHRG.selectSingleNode("/dfs:myFields/dfs:dataFields/tns:getAVResponse/tns:getAVResult/CaseList/Case");
    IXMLDOMNode Original = thisXDocument.DOM.selectSingleNode("/CaseList/Case");
    Original.parentNode.replaceChild(oNode,Original);


    So that complete my form! No probleme here

    My probleme is when I do that I can edit empty field return by the webservice !

    It's an reapeating section who choice (for example: an adress, a name, or goal (all are choice section)) depends on which title! and if this field are empty you can't edit them you can select it but you can write nothing (like a read-only field)! You can only write in the rich text box and in your control(Smart Combo Box) all other are "read-only"!

    Why infopath make this? Have you any idea?

    I hope that you understand what I try to explain!

    Thanks a lot for all your help!

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 08-10-2005 06:26 AM In reply to

    Re: Unable to fill out my form after ws call

    Ok! I have understand what I do false!

    The problem is that Infopath erase all the old data and put the new!
    And sometimes depend on the schema requirements he don't send an empty
    markup so infopath can't store them so the field is read-only!

    Now my question is : Is it possible to make a merge between the old and the new?

    If not I think the best way to accomplish that is to make a xsl that transform my new
    and add all the field that is not present!

    Do you things it's a good idea or have you a better idea?

    Thanks for your help

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 08-10-2005 04:18 PM In reply to

    Re: Unable to fill out my form after ws call

    Why not use a secondary data source (2DS) to receive the data and then have a handler that maps the fields into your main data source. You could use an XSL for this, or you could do it manually.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 08-10-2005 10:44 PM In reply to

    Re: Unable to fill out my form after ws call

    Hi Patrick,

    Thanks for your answer!

    quote:
    and then have a handler that maps the fields into your main data source.


    Ok so I have to make an xsl which for each group section see if all element are present.

    What I have to make is a query in a database by a webservice and after the user can modify the data and add some new elements for example enter a translation of their name or remove the legal seat to put another change the person name, fonktion, ...

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 08-10-2005 10:58 PM In reply to

    Re: Unable to fill out my form after ws call

    Hi Thierry,
    You could just have some code that iterates through the DOMs copying if one is blank etc.
    Or, you could display both side-by-side in the view and have the user click a button to map them over.
    I still don't feel like I understand exactly what your form is doing. Can you explain? That might
    help me.
    Regards,


    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.