Finding image within Picture library - InfoPath Dev
in

InfoPath Dev

Finding image within Picture library

Last post 12-31-2010 07:18 AM by Potemkine. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-31-2010 04:04 AM

    Finding image within Picture library

    Hi,

    I have a picture library, which has multiple folders. Images are stored inside each of the folders.

    I am using Infopath 2010 filler form to create a form, as i need to create the form which should work online as well as offline.

    In the infopath form, i have added a textbox, button and picture tool.

    The picture library is called "MyImageLibrary". xpath value of textbox is "/my:myFields/my:fieldImageName"  xpath value of the Picture is "/my:myFields/my:Image1"

    When the user inputs the name of the image in the textbox and clicks on button, i want to search the whole of picture library(all the folders inside), and if an image is found, show that image in the picture box in the infopath form.

    I want to achieve the above functionality in Online as well as offline scenario.

    How to achieve this?

    Thank you

  • 12-31-2010 07:18 AM In reply to

    Re: Finding image within Picture library

    Hi, I suggest you to use C# or vb and not C#(compatible 2003) because it's really easier to set rich text value on some field.

    You have to get all your image path for that you can use some web service with code or with a data source. You have to use a default view wich show you all the file without folder if you use data sources.

    After that you can bind a drop down to your list, add an event on it and add some code like:

    //build here your URL

    string url="My url"; 

     XPathNavigator node = this.MainDataSource.CreateNavigator().SelectSingleNode("RICHTEXT_XPATH", this.NamespaceManager);

    node.InnerXml = "<img xmlns=\"http://www.w3.org/1999/xhtml\" src=\"" + url + "\"/>";

    On a rich text box.

     

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