Help with Sharepoint query... - InfoPath Dev
in

InfoPath Dev

Help with Sharepoint query...

Last post 09-08-2010 08:27 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-07-2010 06:45 AM

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Help with Sharepoint query...

    Hello,

    I am still very new to this, so I think this is a very basic question but I don't know how to go about it. I have 2 fields on the form that I want populated from a sharepoint list.  Application_Name and Version.  The Application_Name is a drop-down combo box and the Version is just a text box.  I want the the 1st drop down to allow the user to pick the application from a list then have the Version go into the 2nd field.

    In the Sharepoint list these are separate columns like so.

    Application_Name              Version

    Program 2010                     1.12
    Program 2010                     2.0
    Something Else                  1.5

    So the two columns need to be joined in the drop-down but shown in separate boxes on the form.

     

  • 09-07-2010 08:46 AM In reply to

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Re: Help with Sharepoint query...

     Further searching led me to this post which ultimately solved my problem.  I wasn't using the right search terms before!!

    http://www.infopathdev.com/forums/p/13285/47528.aspx

  • 09-07-2010 09:01 AM In reply to

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Re: Help with Sharepoint query...

     Ok.  Now I do need help.  I'm sorry I'm keeping my on thread going here...On further exam there is a problem because some of my items in the first column (Application_Name) in sharepoint are duplicates and by using rules the version column is always the same.

     Here is what I did so far.

    AppName (drop-down) has a rule to set the value of AppVersion = @Version[@Application_Name = AppName]

    Like I said, it populates the text field but somehow I need to have the ID field or something in here so it can handle duplicate values of AppName.

    My example above is the perfect situation.  It will list Program 2010 twice in the dropdown but both choices will put 1.12 in the version field.

    Application_Name              Version

    Program 2010                     1.12
    Program 2010                     2.0
    Something Else                  1.5

     

    Anyone?

  • 09-07-2010 03:27 PM In reply to

    Re: Help with Sharepoint query...

    You will always get the first version if the app names are the same. I think what I'd do is have another column in my list that combines the name and the version into a single field and use that for my drop down.

    Hilary Stoupa

  • 09-07-2010 04:24 PM In reply to

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Re: Help with Sharepoint query...

     Hi,

    Yes, I didn't really want to do that because it will be very messy (VERY wide drop down for some).  Though out of curiousity I decided to try this, but after creating a new calculated column in my Sharepoint list Infopath won't see it.  When I go through Data Connection Wizard my field "ApplicationVersion" doesn't appear as an available column.

    Would there be a way to do this just in the form itself?  Concatenate the ID field and the Application_Name and use that somehow to create a unique name?  I'm not sure.

  • 09-07-2010 04:31 PM In reply to

    Re: Help with Sharepoint query...

    No, not in a drop down. Definitely in a text or expression box, but not for drop down entries.

    Hilary Stoupa

  • 09-08-2010 07:02 AM In reply to

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Re: Help with Sharepoint query...

     Ok well I tried what you suggested by creating a calculated field (ApplicationVersion) in sharepoint which joins the Application_Name and Version into one.  It's not pretty, but I guess it would work.  Now when I look at the retrieve data connection in Infopath this new column is not available.  This list has only one view (All Items) and shows the new column just fine.  I can't seem to use this new column in my form.  What am I missing?

  • 09-08-2010 08:27 AM In reply to

    Re: Help with Sharepoint query...

    I misled you, I'm afraid -- I didn't realize that calculated SharePoint columns wouldn't be available in a data connection. Apparently, even if you use an owssvr.dll connection to return XML you will have additional gunk on the string that you won't want.

    This may be something that can only be done with qRules or code....

    Hilary Stoupa

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