Using a hyperlink to query a specific item in a SP List - InfoPath Dev
in

InfoPath Dev

Using a hyperlink to query a specific item in a SP List

Last post 05-07-2014 11:40 AM by Hilary Stoupa. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 05-05-2014 08:31 AM

    Using a hyperlink to query a specific item in a SP List

    I have this working on one site, but trying to mirror on another site and I can't seem to get it to work. I am using a hyperlink to query an account #, so when someone clicks on the link it shows them the account# if it already exists on the list under All Items.. if the item doesn't exist, it simply shows an empty list. Here's how I have it setup: concat("https://TEST/Sites/ArbitrationActionCalendar/Lists/Arbitration%20Action%20Calendar/AllItems.aspx?View={D7A041A5-EA00-4382-9166-AC5CDA7B2261}&FilterField1=LinkTitle&FilterValue1=", CLAIM NUMBER, "&InitialTabId=Ribbon%2EList&VisibilityContext=WSSTabPersistence") When I try to mirror it on my other site, by replacing the URL and the Claim Number field .. it pulls up the list correctly, but shows all items instead of only displaying the # entered in the field... Any idea why or what I need to change? (I tried changing FilterField1 to just FilterField and FilterValue1 to FilterValue, but same results) Thanks! -Andrew
  • 05-05-2014 10:02 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    On your new site, where it isn't working, if you manually apply the filter on the list and compare that URL with the URL you are creating, are they the same? Obviously, the one you manually create will have the actual claim number in it, but this gives you a way to verify the URL....

    Hilary Stoupa

  • 05-05-2014 11:15 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    So when I did a filter this is the URL I got: (this is for the new site I'm trying to mirror on) https://TEST/Sites/CRSBillReviewLog/Lists/CRS%20Nurse%20Log/AllItems.aspx?View={89f76fd4-4c67-4311-a2fb-7f8764619528}&SortField=ICN_Text&SortDir=Asc So the View ID # is different, which I just tried changing but same issue.. its returning the list correctly, but not querying the field I need it to.. so the new concat forumla looks like: (with ICN# being the field I need to query instead of Account#) concat("https://TEST/sites/CRSBillReviewLog/Lists/CRS%20Nurse%20Log/AllItems.aspx?View={89f76fd4-4c67-4311-a2fb-7f8764619528}&FilterField1=LinkTitle&FilterValue1=", ICN, "&InitialTabId=Ribbon%2EList&VisibilityContext=WSSTabPersistence") I'm still kind of lost as to what else needs to be changed.. only think I can think of is the FilterField/ LinkTitle/ FilterValue info? Or the InitialTabID stuff at the end of the URL
  • 05-05-2014 11:27 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    Well - you have a sort field of ICN_Text - is that the field you want to be filtering on? Is the LinkTitle field even in the view?

    Hilary Stoupa

  • 05-05-2014 12:10 PM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    I'm not sure if the LinkTitle field is in view.. its just what was used on the other site so I guess I was just assuming it should be included on this one too.. All I did is a filter of Ascending the ICN column from A to Z to get the URL with that specific List ID.. so do you think replacing the &FilterField1= and adding &FilterField1=ICN_Text would do it?
  • 05-05-2014 12:14 PM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    Yea no luck with the following - tried both: &FilterField1=ICN_Text&FilterValue1= and &FilterField1=ICN_Text (without the filtervalue) ... even tried to get rid of the entire string like this: concat("https://cicomposites.lmig.com/sites/CRSBillReviewLog/Lists/CRS%20Nurse%20Log/AllItems.aspx?View={89f76fd4-4c67-4311-a2fb-7f8764619528}", ICN, "&InitialTabId=Ribbon%2EList&VisibilityContext=WSSTabPersistence") .. still pulls the entire list of items
  • 05-05-2014 12:56 PM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    Can you add the filter you want in the list and then paste the url in a reply? In your earlier attempt, I can see you sorted, but it doesn't appear you actually added a filter on your desired filter column.

    Hilary Stoupa

  • 05-05-2014 01:58 PM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    Ahh gotcha, let me try that and I'll post my results - thanks so much!
  • 05-07-2014 08:47 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    So not sure exactly what type of filter I should be creating? I created a personal view that shows only the ICN field and the URL looks like: https://TEST/Sites/CRSBillReviewLog/Lists/CRS%20Nurse%20Log/PersonalViews.aspx?PageView=Personal&ShowWebPart={03D4F541-2505-4DB6-8B34-D0D47B3433C7} ------ I Tried replacing the ending set of #'s with mine and it still isn't working.. I just don't understand why it works fine on the other site and I replace everything that should be replaced from what I can tell and it still continues to pull up the ENTIRE list of items.. it doesn't even pull up the ICN column by itself which is what its supposed to do.. Very lost on this one
  • 05-07-2014 08:55 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    Go to the default view of the list you want to create the link for. Find the column you want to filter on. The column heading has a little drop down arrow, right? And you can click it to show a menu? The items in that column should have checkboxes beside them if the column can be filtered. Click one of the checkboxes. Then copy the URL and paste it here.


    Hilary Stoupa

  • 05-07-2014 09:10 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    when I goto the default view and click the drop down I only have the A on Top / Z on Top and the Clear Filters option.. nothing shows under that.. if I try to goto All Items and click the drop down arrow, I get an error: Cannot show the value of the filter. The field may not be filterable or the number of items returned exceeds the list view threshold. --- Is there an option or something I need to enable to be able to filter from the list like you are asking?
  • 05-07-2014 09:25 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    Can you try datasheet view? Here is a link with some other ideas: http://office.microsoft.com/en-us/sharepoint-server-help/introduction-RZ101874361.aspx?section=2

    Hilary Stoupa

  • 05-07-2014 10:25 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    Ok I was able to do it in Datasheet view.. I just picked one of the ICN# checkboxes listed.. here is the URL it gives: https://TEST/Sites/CRSBillReviewLog/Lists/CRS%20Nurse%20Log/AllItems.aspx?ShowInGrid=True&View=%7BA5FBC9BA%2D35D4%2D4EA9%2D9729%2D752CD6DB9093%7D&InitialTabId=Ribbon%2EList&VisibilityContext=WSSTabPersistence
  • 05-07-2014 11:40 AM In reply to

    Re: Using a hyperlink to query a specific item in a SP List

    Darn. I'd hoped it was going to show the filter field and value in the URL.

    I mean, based on everything here, I'd assume a link like this would work:

    https://TEST/Sites/CRSBillReviewLog/Lists/CRS%20Nurse%20Log/AllItems.aspx?View={89f76fd4-4c67-4311-a2fb-7f8764619528}&FilterField1=ICN_Text&FilterValue1=DESIREDVALUE

    With your filter value in the spot that says "DESIREDVALUE".

    But since you can't filter on this column in the view w/out an error, I'm not sure if this would work at all.

     

    Hilary Stoupa

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