What's the best method to get a list item URL? - InfoPath Dev
in

InfoPath Dev

What's the best method to get a list item URL?

Last post 09-14-2015 09:56 AM by chrisgee. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-28-2015 08:58 AM

    What's the best method to get a list item URL?

    I'm building a form that allows users to select from a list of topics in a drop-down menu. The form compares their selection against several Sharepoint lists, displaying the items with matching topics. I'd like to include a link to each list item so the user can click through to see the full item. I came up with something that works, sort of. I created a hidden field with a formula that concats the list URL with the ID of the matching list item, then used that as the data source for the hyperlink. This works but only for the first item of each list. If a list has multiple matches, the ID returned is still the first one. How can I get it to recognize consecutive IDs? And is there a better way to do this? I'll upload my template, though it uses several external data sources.
  • 08-28-2015 09:57 AM In reply to

    Re: What's the best method to get a list item URL?

    Okay I figured out my first blunder: the hyperlink data sources were local to the form, I needed the source to be within each list so it would repeat as needed. So I created a new column in each list called "ItemLink" and put the concatted URL+ID there, then used that as the data source in the hyperlink. Now I am reliably getting correct links to each discrete list item that displays. Still, this seems a very clunky way to get to a list item URL. So my original question still stands, what's the best way to obtain the URL to each list item so a link can be created dynamically? I know you can do it using SP Designer workflows, but even that seems needlessly complex. Or is that just what Sharepoint is? :)
  • 09-09-2015 03:01 PM In reply to

    Re: What's the best method to get a list item URL?

    Yeah, we usually just use a calculated value for that - if you use an owssvr.dll data connection you should be able to get back the actual link, so that may be worth a try.
    Hilary Stoupa

  • 09-14-2015 09:56 AM In reply to

    Re: What's the best method to get a list item URL?

    yes i think i'll need to do something like that. i didn't realize until later that my method doesn't work on the initial creation of a new list item. it requires going back in an editing the item for the ID to get properly added to the URL.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.