SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am converting some numbers using Javascript and need to filter a list using these conversions. I cannot do the conversions within SharePoint itself, so I had to use Designer and some Javascript. I need to use the end variable, compare, in the filter criteria of my Data View Web Part. I do not currently have it as a return value, but if needed, I can make the Javascript function return it. How do I reference this variable in my Filter Criteria?

share|improve this question
up vote 2 down vote accepted

The script is going to run client side, so you can't filter the DVWP with the calculations. You can filter client side and either remove or hide the items in the DOM.

share|improve this answer
Could you recommend a source to hide items in the DOM? Thanks. – sange Mar 29 '11 at 20:14
Plenty of examples on the Web for that. Basically, you set display: hidden. – Marc D Anderson Mar 30 '11 at 11:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.