This project has moved and is read-only. For the latest updates, please go here.

"Filter" in .each?

Aug 3, 2010 at 5: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 2:03 AM
check this link to see if it helps you out
Aug 4, 2010 at 3:49 AM

Be sure to use the selector like this:



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


Aug 4, 2010 at 9: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 11:23 AM

Found it out

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