Question

I am running SharePoint Foundation on Windows Server on a hosted site. I am able to retrieve a value with jQuery from the User Information List. Using Sharepoint Designer 2010, I have added a DVWP to filter a list. There is a filter parameter wizard in Designer, but I am not able to feed the value from the jQuery to the parameter wizard. Do I need to create a form variable, or a form control that the jQuery can populate? (If so how is that done?) Can I use that form control in the DVWP? There are options to use a server variable, control, or a form field in the filter wizard. Please show me how to do this. Thank you.

Was it helpful?

Solution

It depends on what the value is and how you want to use it. One thing to consider is putting a placeholder in the output from the DVWP and fill it in client-side in a $(document).ready function.

You can actually use the User Information List as a DataSource in an AggregateDataSource in the DVWP. The User Information List is hidden, but it you have the appropriate permissions, you can query it. Keep in mind that your average user may not be able to, however.

The other option is to use the SharePoint Web Services to determine the user's group membership. Take a look at my SPServices jQuery library.

OTHER TIPS

You could create a hidden field which is populated using jQuery, and your parameter use that hidden field, however your hidden field would then be populated at run-time, and I'm not entirely sure if the filter works at runtime, or if the view is filtered at the server end using the parameter.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top