This project has moved. For the latest updates, please go here.

"Filter" in .each?

Aug 3, 2010 at 4:22 PM
Hi, Can you add a "filter" in the each function so that you for example only get the values with Title contains asdf (I need the filter in the each function not in the CAML) something like $(xData.responseXML).find("z\\:row WHERE ows_Title Contains asdf ").each(function() { });
Aug 4, 2010 at 1:03 AM
check this link to see if it helps you out
Aug 4, 2010 at 2:49 AM

Be sure to use the selector like this:



Why wouldn't you put the filter into the CAML?


Aug 4, 2010 at 8:55 AM

I'm using it to make a joined list view and want to minimize the amount of web service calls. So what I really need is something equal to

<xsl:variable name="Rows" select="../../../Library/Rows/Row[contains(@Activity_x0020_ID, $dvt_ParentRow/@GUID)]" />
To minimize the rows that needs to be checked in the .each loop I would like to do something like
$(xData.responseXML).find("[nodeName=z:row]")-but only the rows where the column Activity_x0020_ID contains parent GUID
btw - the xsl data view didn't work too good in this specific case, complaining about too many lookup columns
Aug 4, 2010 at 10:23 AM

Found it out

$(xData.responseXML).find("[nodeName=z:row][ows_Activity_x0020_ID*='"+activityID+"']").each(function() {
Aug 5, 2010 at 1:55 AM