Determine which subsite called form? - InfoPath Dev
in

InfoPath Dev

Determine which subsite called form?

Last post 12-05-2014 06:38 AM by ChrisJackson19. 38 replies.
Page 2 of 3 (39 items) < Previous 1 2 3 Next >
Sort Posts: Previous Next
  • 11-18-2014 09:57 AM In reply to

    Re: Determine which subsite called form?

    Does the GetList data connection return the GUID in the ID attribute?

    Hilary Stoupa

  • 11-18-2014 11:03 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Determine which subsite called form?

    Hmmm.  I think that may be the problem.  There aren't any attributes under "GetListResults."  =(  Just a locked folder.  See attachment...
  • 11-18-2014 11:08 AM In reply to

    Re: Determine which subsite called form?

    Yuck - Let me test a little later today and see what I get back, okay? I was sure that was the method I used before to get the ID, but I may be confused & / or lying. ;)

    Hilary Stoupa

  • 11-18-2014 03:38 PM In reply to

    Re: Determine which subsite called form?

    For some reason I don't remember having this issue (but it has been a while, who knows what all I've forgotten). However, work-around city - the data is there, IP is just not generating a schema. :)

    xdXDocument:GetDOM("GetList")/dfs:myFields/dfs:dataFields/tns:GetListResponse/tns:GetListResult/*[local-name() = "List"]/@*[local-name() = "ID"]

    Everything up to /*[local-name() = "List"]/@*[local-name() = "ID"] might be a little different in your form - so select GetListResult using the field picker then paste on the rest of it. That should get your GUID - at least it did for me (I tested with a calculated value, changing the query field and re-querying the GetList data source).

    Hilary Stoupa

  • 11-19-2014 08:06 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Determine which subsite called form?

    I have created a field to input the List name.  On change, it Sets listName to that field, and then it does the GetList query.

    I have a calculated field that is equal to GetListResult.  It brings back a LOT of stuff (see attached).

    Not quite sure what to do from here.  =(

    BTW...I think it doesn't give any parameters, because it doesn't know what list you are going to pick?  When I ran on open with a value, it actually gave me the parameters for that list.  But then the form went wonky!


  • 11-19-2014 08:15 AM In reply to

    Re: Determine which subsite called form?

    Can I see a copy of your form? Either attach it under the options tab, or you can email me - HilaryDOTStoupaATQdabraDOTcom

    Hilary Stoupa

  • 11-19-2014 08:40 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Determine which subsite called form?

    Form sent (and received!).  Just wanted to make sure you knew that I did NOT do this:

    Everything up to /*[local-name() = "List"]/@*[local-name() = "ID"] might be a little different in your form - so select GetListResult using the field picker then paste on the rest of it. That should get your GUID - at least it did for me (I tested with a calculated value, changing the query field and re-querying the GetList data source).

     

  • 11-19-2014 12:16 PM In reply to

    Re: Determine which subsite called form?

    I sent you an email w/ your form attached - to get the GUID, you'll need to use a formula with the edits I added - check the template I returned in your enviro and see if that expression box now has a GUID. :)

    Hilary Stoupa

  • 11-19-2014 02:05 PM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Determine which subsite called form?

    Dang it. I don't think I have my parameters right on ChangeConnectionUrl.  Here's what I have:

    Field:  SiteURL - Value=SharePointSiteUrl() - this is bringing back the correct site url!

    Rule on finishedLoading = TRUE

    Set command = concat("ChangeConnectionUrl /dsname=GetList /url=", SiteURL)

    Getting an error when querying data source.  =(

    When I hard-code the SiteURL, this is the error I get back:

    The query cannot be run for the following DataObject: GetList
    InfoPath cannot run the specified query.
    The SOAP message cannot be parsed.

    ARGH!

  • 11-19-2014 02:17 PM In reply to

    Re: Determine which subsite called form?

    Well - remember, the URL to the lists service is http://server/site/_vti_bin/lists.asmx. So, if you set it http://server/site it is going to fail. You'll need to concat in the rest of the URL.

    Hilary Stoupa

  • 11-20-2014 05:21 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Determine which subsite called form?

    LOL!  Thought of that in the middle of the night!  Trying this morning. 
  • 11-20-2014 08:04 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Determine which subsite called form?

    ARGH!!!  This works GREAT from my desktop, but NOT when I publish.

    So, will this still work if I convert GetList to udcx file?

  • 11-20-2014 12:00 PM In reply to

    Re: Determine which subsite called form?

    What is going wrong in the browser? Is it a data connection error? You aren't using Office 365, are you (sorry, should have asked that right at the start)?

    Hilary Stoupa

  • 11-21-2014 07:03 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Determine which subsite called form?

    Not in Office 365, but am in a claims-based site.  Developer decided to take off for 3 days, so I can't see what the errors are until Monday.  =(

    I have made two data connections for GetList. 

    1. GetList
    2. GetListUDC (that has been converted to a udcx file) 

    GetList 

    • If I do a ChangeConnectionUrl to the same site as the original GetList settings, and then query GetList, it works. 
    • If I do a ChangeConnectionUrl to a site different from the original, and then query GetList, I get an error.

    GetListUDC

    • If I do a ChangeConnectionUrl to the same site as the original GetListUDC settings, I get an error.
    • If I do a ChangeConnectionUrl to a site different from the original, and then query GetListUDC, I get an error.

    No errors are showing up in Qdabra's "Error" field in any instance.

    I've had to jump through hoops before because of a claims-based site, so this may be part of the problem.  What I need to know is:

    Does ChangeConnectionUrl for GetList work if the data connection has been converted to .udcx?  If so, I will continue down this road.  If not, I will stop!

    THANKS!

  • 11-21-2014 07:10 AM In reply to

    Re: Determine which subsite called form?

    Well - the whole point here is that you'll be changing your GetList connection to the same site as the form is published to. So if you don't have an error as long as the URL is the same site as the form is published to, I'd guess you are good without UDCX.

    If I were testing this, I would set up the logic to change the GetList connection to the same site as the form is published to, and try publishing the form to a different site - isn't that the original problem you are trying to solve?

    Hilary Stoupa

Page 2 of 3 (39 items) < Previous 1 2 3 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.