Concatenated Hyperlink - InfoPath Dev
in

InfoPath Dev

Concatenated Hyperlink

Last post 06-20-2011 02:26 PM by brentmartin184. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-15-2011 09:48 AM

    Concatenated Hyperlink

    Hi,

    I have a hyperlink control and a text box control (named ID) on a browser enabled form. For the hyperlink, I have the "Data source" property under the "Link to" section set to the following:

    concat('http://TrackOrders/frmOrdersLookup.aspx?OrderID=', ID)

    The ID text box is getting a value when the form is opened, but the hyperlink is not picking it up such that the resulting address is the following:

    http://TrackOrders/frmOrdersLookup.aspx?OrderID=

    What am I doing wrong here? Any suggestions are greatly appreciated.

    Thanks.

  • 06-20-2011 02:40 AM In reply to

    That is strange.  I've observed the same behavior just now and it seems like it might be a bug in InfoPath.  Luckily, there's hope.

    Firstly, I don't think a hyperlink control is the right tool for the job here.  Hyperlink controls allow form users to edit the link, but it doesn't sound like you want that.  An ordinary hyperlink (you can find this on the Insert tab) allows you to specify the link text if you want it to be different from the URL, and it's compatible with all versions of InfoPath, so that's usually a better choice.

     To use a hyperlink, you'll need to store the link URL in a field somewhere and specify that as the field for the hyperlink.  This field can be in the main data source, or in a secondary data source if you don't want to store it in the main data source.  You'll need some rules or a default value formula on the field to populate it with the right value.

     Does that help?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-20-2011 02:26 PM In reply to

    I actually got it working by using the following:

    concat("http://TrackOrders/frmOrdersLookup.aspx?OrderID=", ../my:ID)

    Thanks for the suggestion.

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