Using (picture) controls as a Calculated Value using XPath - InfoPath Dev
in

InfoPath Dev

Using (picture) controls as a Calculated Value using XPath

Last post 03-07-2011 02:39 AM by hhrafn. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-04-2011 03:07 AM

    • hhrafn
    • Not Ranked
    • Joined on 02-17-2011
    • Posts 6

    Using (picture) controls as a Calculated Value using XPath

    Hi,

     I'm trying to construct a form (InfoPath 2010) that will use data from a secondary data source. This secondary datasource will be used to supply the user with options and information while filling out the form.

    However, I don't want (need) to submit all of this information with the main data. For example a picture, referenced in the secondary datasource. has no need to accompany the for after the first submission.

    So, can I set up controls (such as the picture control) to use XPath to reference the correct data, but be bound to a "local" datasource.

    I'm actually able to do this using XPath, so selection the data isn't a problem.. it's just that InfoPath doesn't like me to use the controls that way and will throw out an error (though I can at least preview the form and see this functioning :P ).

    P.s. the Calculated Value control seems to be the only control that allows me to do this shamelessly (since it's basicallty designed for this).

  • 03-07-2011 02:09 AM In reply to

    Re: Using (picture) controls as a Calculated Value using XPath

    You should be able to just drag and drop the fields from a secondary data source into your view. There shouldn't be any errors. We do this all the time. Are you using InfoPath Form Library or SharePoint List Forms?

    Patrick Halstead
    Project Manager at Qdabra
  • 03-07-2011 02:39 AM In reply to

    • hhrafn
    • Not Ranked
    • Joined on 02-17-2011
    • Posts 6

    Re: Using (picture) controls as a Calculated Value using XPath

    This would be published to a form library.

    In order to descript by situation better here's a simple example of the kinds of datasources I'm using:

    External DS:

    • books
      • book
        • id
        • title
        • type
        • description
        • picture

    internal (the form library):

    • person 
    • department
    • orders
      • book
        • id
        • quantity

    This is a very simplified (and mostly a mockuup) version of what I'm working with. But basically I have a list of "books" and would like to allow people to see the list of those books and order them (one or more). The results from that selection (from the quantity) would be what is submitted with the form. So information such as picture etc. isn't needed.

    But while the user is browsing the list, I would like to show the pictures (for example), without haing the form storing it's binding. Sounds to me like XPath should do the trick?

     Is there any practical way to accomplish this?

    .. or am I perhaps on the wrong track here? Is there perhaps a better (more practical) way to accomplish this cataloge shopping-like feature?

    with thanks,
    H.

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