Visibility runs for a default value

Aug 30, 2011 at 6:16 PM

I have a sharepoint list that has

operational period

accounting period

based on their selection it does hide /show the reports based on operational or accounting.  However, I want it to show automatically the operatoinal reports when the user comes into the site, I don't want them to be forced to choose, it should default to operational...how would I do this?

Coordinator
Aug 30, 2011 at 7:03 PM

Yeah, that's tricky because with connected web parts, SharePoint does not provide a way to specify the default value to send on the connection when it is first displayed.  It doesn't send anything over the connection until the user takes an action interactively.

I think one way would be to have the operational report web parts be initially visible, and the accounting report web parts be hidden (using the Hidden attribute under Layout in the web part properties).

 

Aug 31, 2011 at 1:03 AM

Thanks Joe.  I have tried that, however, when you do that then when you switch to accounting period the operational AND the accounting period reports display.

Coordinator
Aug 31, 2011 at 1:43 AM

How do you have the Visibility Filters set up?

I know I have done something similar on a site (I need to find it...)

I think you would need:

- a Visibility Filter that triggers when Operational is selected, that makes Operational visible

- a Visibility Filter that triggers when Operational is selected, that makes Accounting invisible

- a Visibility Filter that triggers when Accounting is selected that makes Accounting visible

- a Visibility Filter that triggers when Accounting is selected that makes Operational invisible

Connect your list web part to all four Visibility Filter web parts.

 

Aug 31, 2011 at 11:02 AM

I have the following:

The excel web parts for operational and accounting reports is set to hidden (per visibilitywebpart instructions)

Have a visibility filter that SHOWS Operational reports  when Operational is selected

A visibility filter that HIDES OPERATIONAL reports when Accounting is selected

a visibliity filter that SHOWS ACCOUNTING when Accounting is selected

a visibility filter that HIDES ACCOUNTING when Operational is selected.

 

If you set the operational report web part to not HIDDEN, it will ALWAYS show, so when you click on accounting filter, the Accounting reports DO show up, but so does the Operational because even though I have a visiblity web part that is suppose to HIDE operational when accounting is selected, the hidden/non-hidden properties on the actual excel web part for operational override it and they both display.

 

Coordinator
Sep 1, 2011 at 2:58 PM

I just looked at a site where I have something similar,

There are two Excel Services web parts.

One should display when a web part sends "Internal" and another when it sends "External".

Both are visible (do not have the Hidden attribute checked).

Above them on the page, I have Visibility Filters that:

- When connection value is "External", show the web part with External as the title

- When the connection value is "Internal", hide the web part with External as the title

- When the connection value is "External", hide the web part with Internal as the title

The difference I think is that I am using a custom web part to send the values over the connection.

I tried something similar to your setup, using the List View web part, and I can see your problem - the List View web part does not send any value over the connection until something is interactively selected.

I changed the page to use a SharePoint List Filter Web Part(an out-of-the-box web SP 2007 part), and it will work as you want it to work, because the SharePoint List Filter Web Part has a property for Default Value, which I set to "Internal".  The Choice Filter Web Part works in a similar way, except the choices are coded in the web part properties instead of a list.

Unfortunately, the SharePoint List/Choice Filter Web Parts require an extra click to bring up the choices.  The List View web part works much more nicely, if it would send a default value.

Could you take a look at these other web parts to see if they might work for you?

The only other alternative I can think of might be to use SharePoint Designer and convert your List View web part into a Data View Web Part.  You can then change some other attributes of the web part that are not available through the browser interface, but I do not know if any of them will force it to initially send a value.

 

 

Sep 2, 2011 at 11:08 AM

Joe, Thanks I will look at it when I get back from vacation and let you know.

Mindy Shores

Enterprise Data Warehouse

NCR Corporation

(937) 445-3599

From: JoeD [email removed]
Sent: Thursday, September 01, 2011 10:59 AM
To: Shores, Mylinda M
Subject: Re: Visibility runs for a default value [SPVisibilityFilter:270918]

From: JoeD

I just looked at a site where I have something similar,

There are two Excel Services web parts.

One should display when a web part sends "Internal" and another when it sends "External".

Both are visible (do not have the Hidden attribute checked).

Above them on the page, I have Visibility Filters that:

- When connection value is "External", show the web part with External as the title

- When the connection value is "Internal", hide the web part with External as the title

- When the connection value is "External", hide the web part with Internal as the title

The difference I think is that I am using a custom web part to send the values over the connection.

I tried something similar to your setup, using the List View web part, and I can see your problem - the List View web part does not send any value over the connection until something is interactively selected.

I changed the page to use a SharePoint List Filter Web Part(an out-of-the-box web SP 2007 part), and it will work as you want it to work, because the SharePoint List Filter Web Part has a property for Default Value, which I set to "Internal". The Choice Filter Web Part works in a similar way, except the choices are coded in the web part properties instead of a list.

Unfortunately, the SharePoint List/Choice Filter Web Parts require an extra click to bring up the choices. The List View web part works much more nicely, if it would send a default value.

Could you take a look at these other web parts to see if they might work for you?

The only other alternative I can think of might be to use SharePoint Designer and convert your List View web part into a Data View Web Part. You can then change some other attributes of the web part that are not available through the browser interface, but I do not know if any of them will force it to initially send a value.