form state - InfoPath Dev
in

InfoPath Dev

form state

Last post 12-22-2006 05:44 AM by jweir. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-21-2006 08:34 AM

    • jweir
    • Not Ranked
    • Joined on 12-14-2006
    • USA
    • Posts 15

    form state

    Hello all,

    Happy Holidays to you all

    Not sure where this topic should go, so I am putting it here for now.

    I am not sure if this can be done or not

    I would like to know if user is creating a new form or updating an old form. I have published the form to SharePoints 2003 and set the flag to allow overwrite the form which is great and works.

    What I would like to do is if the user creates a new form to populate some of the fields for the user, but if they are editing an old form not to populate the fields except for a few others.

    Thank you in advance for all your help
    InfoPath 2003 SP2
    Office 2003 SP2
    SharePoint 2003
    VS 2003

    Jim Weir
  • 12-21-2006 10:24 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694
    Hi Jim Weir,

    You are populating some field#%92s values by using rules right. Then you need to have one condition on that rule depends the form is new or old one. This value we can find using onLoad code as below.

    var formState = XDocument.IsNew;
    XDocument.DOM.selectSingleNode("/my:myFields/my:FormState").text = formState;

    In FormState field have the value is from is new or old (True/ False). You can use this field for condition on above rules which ever you populating the data to some fields.
  • 12-22-2006 05:44 AM In reply to

    • jweir
    • Not Ranked
    • Joined on 12-14-2006
    • USA
    • Posts 15
    Thanks Shiva,

    One more quick Question...

    from the Onload is there an easy way to a submit using a data connection?

    InfoPath 2003 SP2
    Office 2003 SP2
    SharePoint 2003
    VS 2003

    Jim Weir
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.