dynamically change the udcx source url property at run time in infopath form services - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

dynamically change the udcx source url property at run time in infopath form services

Last post 07-08-2013 03:10 AM by dbfuller. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-25-2013 04:44 AM

    dynamically change the udcx source url property at run time in infopath form services

    Instead of altering the actual (relative) udcx file I would like to change the data connection source url property, which points to the udcx file, at run time. The desire is that within infopath form services, at run time, the url pointing to the data connection udcx file is replaced with one relative to where the form was opened. This would enable the same form template to be deployed many times within the same site and each point to their very own data sources, e.g. a contacts list. If you can imagine a site collection which has four sub sites. A form has been deployed to the site collection. With in each of the four sub sites a form library has been created (e.g. bookings) with the same name. Also in each of the four sub site a list has been created, again all with the same name (e.g. contacts). To connect the form to the contacts list a data connection has been created and converted to a data connection file (udcx). In each sub site a data connections library has been created with the same name (e.g. data connections). Before the data connection file is added to each data connection library, the list GUID and site url is changed. Unfortunately, within the form, the url pointing to the data connection file is relative from the site's root rather than the position of the form at run time. And this all mean you can't point it at multiple connection files within the same site, which is a big problem for the solution im working on. If you could change this url at run time in anyway (e.g. code) then this BIG problem would be solved. If anyone has any thought i would be most grateful.
  • 05-27-2013 05:31 AM In reply to

    Re: dynamically change the udcx source url property at run time in infopath form services

    Yes, this can probably be achieved by writing custom code.

    We accomplish this using the qRules command ChangeConnectionUrl. Here's an introductory video to qRules if you're interested in learning more.

    Good luck!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-18-2013 04:28 AM In reply to

    Re: dynamically change the udcx source url property at run time in infopath form services

     very nice post

    mariya
  • 06-19-2013 01:08 AM In reply to

    Re: dynamically change the udcx source url property at run time in infopath form services

    Thanks for your reply. We used custom code in the end.

    David

  • 07-01-2013 09:56 PM In reply to

    Re: dynamically change the udcx source url property at run time in infopath form services

    I got stuck with the same your situation. Can you share your experience about this issue? Thanks in advance.
  • 07-08-2013 03:10 AM In reply to

    Re: dynamically change the udcx source url property at run time in infopath form services

     Unfortunately I don't write the code for InfoPath so I don't know the exact solution. The major part of the solution is creating our own data connection file. At run time, after InfoPath fetches the data connection details (site name and GUID) from the "normal" data connection file, the code fetches details from our own file and replaces the "normal" details. The other major difference is that our file is placed on the top site and there for contains details against every sub site and their lists.

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