Casting string - InfoPath Dev
in

InfoPath Dev

Casting string

Last post 03-23-2007 05:40 AM by diaboloche. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-21-2007 09:13 AM

    Casting string

    Salut virgul,

    Sais-tu comment caster de l'int vers du string ?

    J'essaye d'utiliser toString() mais je n'y arrive pas...


    //--------------------------------------//
    //--- Ajouter une ligne aux détails ---//
    //------------------------------------//
    function Ajouter_Detail(Operation,Commande)
    {
    Insert_TabExt();

    var comboOperation = XDocument.DOM.selectNodes("/my:mesChamps/my:gestion/my:tabext1/my:ext1/my:comboOperation");
    comboOperation[comboOperation.length-1].text=Operation.toString();
    }


    Merci de ton aide.

    Bonne soirée.
  • 03-21-2007 04:08 PM In reply to

    Salut,

    A mon avis y a 3 possibilités soit ton selectnodes est null (mauvaise requête XPath), soit int Operation est null ou soit combOperation possède l'attribut nillable (xsi:nil) et il te fait une erreur d'insertion, si tu n'enlève pas cette attribut avant d'insérer ta valeur. Pour le dernier cas, tu peux vérifier sa présence dans le template.xml de ton xsn et pour les deux autre à toi de vérifier.

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 03-23-2007 05:40 AM In reply to

    Oui il me renvoyais null... pfff
    Merci !
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.