none
Send parameter via web part connection - when click a column value (hyperlink on the column)

    Question

  • Hi,

    I want to set a web part connection between pages, but to set different connections so each column will execute a different connection when clicking it.

    For example:

    if i have a row like:

    project name, region, manager

    then:

    when click the region column value (for example: "US") - it will link to "US" page,

    when click manager value (for example: "John") - it will link to a page which is filtered with data relevant to "John"

    How to set teh connection from the column and not the row (and set the hyperlink in the column and not the arrow button of the row)?

    thanks!

    etc.


    keren tsur

    Thursday, June 14, 2012 10:20 AM

Answers

  • Hi

    for each column field - @FIELDx insert a code like

    <a href="http://domain/path/page_name.aspx?filter_name={@FIELDx}><xsl:value-of select="@FIELDx"/></a>

    Next in the destination page, select your webpart, add a parameter a  query string and name it filter_value = filer_name

    also from ribbon select "FIlter"

    and add condititions for each columns, using OR like

    Regin           equal     filter_value

    OR

    Manager      equal        filter_value


    Romeo Donca, Orange Romania (MCSE, MCTS, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.


    Sunday, June 17, 2012 10:16 AM

All replies

  • Hi keren,

    When we open the list view in browser and filter a field from the list header, then the list will filtered with that value. This is a similar function with your requirement. So we can find the hyperlink in the filtered view is:

    http://server/site/page.aspx?View={View GUID}&FilterField1=field name&FilterValue1=filtered value

    This is the hyperlink we can use. Remove View parameter and only leave FilterField1 and FilterValue1 value.

    http://server/site/page.aspx?FilterField1=field name&FilterValue1=filtered value

    Next, custom the list view web part.

    1. Open list view page in SharePoint Designer.
    2. Click on the page > Design > Customize XSLT > Customize Entire View.
    3. Select the field you need to add hyperlink to it in code mode. For example region column.
      <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping ="yes"/>
    4. Change it to

    <a href="http://server/site/Lists/list name/AllItems.aspx?FilterField1=region&amp;FilterValue1={$thisNode/@*[name()=current()/@Name]}"><xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping ="yes"/></a>

             5. Repeat the step 3 & 4 for project and manager field. Replace the FilterField1 parameter with current field name or refer to the URL of the filtered view in browser.

    Let me know if you have any unclear.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support


    Friday, June 15, 2012 6:59 AM
  • Thanks for the help.

    I need some more help with the exact syntax:

    i try to customize the XSLT using "format as hyperlink" - select hyperlink to the dispform and then try to change the code.

    Anyway - "FilterField1"  should be replaced? (Region=region&) or should i write just:

    <a href="http://server/site/Lists/list <xsl:value-of">name/AllItems.aspx?region&amp={$thisNode/@*[name()=current()/@Name]}"><xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping ="yes"/></a>


    keren tsur

    Sunday, June 17, 2012 7:24 AM
  • Sorry i forgot to mention - in the page we want to link - we want to use CQWP (not only list views) and that's why i try to build a URL of the page as:

    [target page name]? [filtername]=[filtervalue]


    keren tsur

    Sunday, June 17, 2012 7:44 AM
  • Hi

    for each column field - @FIELDx insert a code like

    <a href="http://domain/path/page_name.aspx?filter_name={@FIELDx}><xsl:value-of select="@FIELDx"/></a>

    Next in the destination page, select your webpart, add a parameter a  query string and name it filter_value = filer_name

    also from ribbon select "FIlter"

    and add condititions for each columns, using OR like

    Regin           equal     filter_value

    OR

    Manager      equal        filter_value


    Romeo Donca, Orange Romania (MCSE, MCTS, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.


    Sunday, June 17, 2012 10:16 AM