Help Reg Infopath 2007 Form published as Content type - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Help Reg Infopath 2007 Form published as Content type

Last post 07-21-2010 11:32 PM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-21-2010 12:57 PM

    Help Reg Infopath 2007 Form published as Content type

    Hello All,

    I need help regarding finding out the form location URL 

    I published a infopath form template  as Site content type to use in multiple form libraries, i have three form libraries 101, 102, 103

    Users fill the forms in their respective form libraries, so when they click on save button ,  infopath client will automatically allows them to save the form in their respective form library ..where they opened. How does infopath client know tht location by default ? can i get tht URL location .. i am trying to get the form library name from tht URL..so can anyone suggest How to find ?

    i tried adding code in form Event loading  to get the URL

    string[] tempuri = this.Template.Uri.AbsoluteUri.Split('/');

    As all form libraries are using same template iam getting the same tempuri value

  • 07-21-2010 05:08 PM In reply to

    Re: Help Reg Infopath 2007 Form published as Content type

    Hi Niranjan,

     First check that when you create a new form from 101 or 102 and try File->Save, does it default to the correct library? If so, you can get that value using code in an OnSave event handler. If not, read on...

    With a content type, if you get the URL for the published template, it will indeed be the same for all form libraries. If you had separate template.xml files (start templates) you could change the default value in each. Using SharePoint Designer (SPD) you can customize the New button. Take a look at what it is doing for your form in question. Viewing source on the page is another way to do this. If the template.xml that New uses is different for each library, you can just edit it to have a default value for the location (could require adding a field that holds the URL). If that doesn't work, you could customize the New button to pass a parameter to InfoPath on load. Using an input parameter you can set the field in the same way. Qdabra's qRules supports getting input parameters via rules so you don't have to write code.

    There may be another way to do this, but that's what I can think of for now.

    Best of luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 07-21-2010 05:42 PM In reply to

    Re: Help Reg Infopath 2007 Form published as Content type

    Thanks Patrick for ur quick reply

    yes form is saving to correct form library... by default

    My req is i have a label field in infopath form.. so when the user open form    from   101 (Form Library Name) that label value shuld be filled with 101 on form loading event

    if the user open form from 102 tht label value shuld be filled with 102

    My infopath form template is published as content type and added to all form libraries (101,102,103..).. so i can u suggest me how to do.. initially i thought i can read Form URL and get form lib nane and assign to it during form loading event.. but it didnt work

    I  appreciate ur help

  • 07-21-2010 11:32 PM In reply to

    Re: Help Reg Infopath 2007 Form published as Content type

    Hi Niranjan,

    You could use SharePoint Designer to remove the New button and replace it with a special button that opens a template.xml with default data specific to the Form Library. That might be easiest since it wouldn't require input parameters. Otherwise, I suggest input parameters.

    Have you used SharePoint Designer to modify the default view in a form library?

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.