Comments on: SharePoint: Extending the DVWP – Part 13: Putting PreSaveAction() to Work – Creating Variables http://www.endusersharepoint.com/2010/06/24/sharepoint-extending-the-dvwp-%e2%80%93-part-13-putting-presaveaction-to-work-%e2%80%93-creating-variables/ No GeekSpeak on SharePoint 2007 WSS and MOSS Mon, 27 Dec 2010 21:17:12 -0500 http://wordpress.org/?v=2.8.6 hourly 1 By: Brad http://www.endusersharepoint.com/2010/06/24/sharepoint-extending-the-dvwp-%e2%80%93-part-13-putting-presaveaction-to-work-%e2%80%93-creating-variables/comment-page-1/#comment-108929 Brad Tue, 26 Oct 2010 17:54:21 +0000 http://www.endusersharepoint.com/?p=8660#comment-108929 Yup, I put modified the wildcard search selector so the id end with $ff_ # instead of just contains. If I had more than 10 items, my ff_1, ff_10, etc were also selected. So the code uses a for loop and searches for $="ff1_" & i & "]" etc. I added some business logic to control some validation and some regex validation to check for dates and numbers. The loop appends a space to the fields that haven't changed so that everything always gets saved even if it hasn't changed. Yup, I put modified the wildcard search selector so the id end with $ff_ # instead of just contains. If I had more than 10 items, my ff_1, ff_10, etc were also selected. So the code uses a for loop and searches for $=”ff1_” & i & “]” etc.

I added some business logic to control some validation and some regex validation to check for dates and numbers.

The loop appends a space to the fields that haven’t changed so that everything always gets saved even if it hasn’t changed.

]]>
By: Jim Bob Howard http://www.endusersharepoint.com/2010/06/24/sharepoint-extending-the-dvwp-%e2%80%93-part-13-putting-presaveaction-to-work-%e2%80%93-creating-variables/comment-page-1/#comment-108928 Jim Bob Howard Tue, 26 Oct 2010 17:48:25 +0000 http://www.endusersharepoint.com/?p=8660#comment-108928 That should work, Brad. Did it? That should work, Brad. Did it?

]]>
By: Brad http://www.endusersharepoint.com/2010/06/24/sharepoint-extending-the-dvwp-%e2%80%93-part-13-putting-presaveaction-to-work-%e2%80%93-creating-variables/comment-page-1/#comment-107637 Brad Thu, 21 Oct 2010 13:56:32 +0000 http://www.endusersharepoint.com/?p=8660#comment-107637 Since I'm using a multi-item dvwp in edit mode, the source shows my text boxes as "_ff11_" followed by the row number returned ( for instance "_ff11_3"). What changes would need to be made to still implement this audit trail you're describing? 15 $("input[name*=$ff3_]").val(); Literally, find all input controls with a name that contains ‘$ff3_’ (there will only be one) and return the value of the value attribute Since I’m using a multi-item dvwp in edit mode, the source shows my text boxes as “_ff11_” followed by the row number returned ( for instance “_ff11_3″).

What changes would need to be made to still implement this audit trail you’re describing?

15 $(”input[name*=$ff3_]“).val();

Literally, find all input controls with a name that contains ‘$ff3_’ (there will only be one) and return the value of the value attribute

]]>
By: SharePoint: Extending the DVWP – Part 35: Putting it All Together, or | EndUserSharePoint.com http://www.endusersharepoint.com/2010/06/24/sharepoint-extending-the-dvwp-%e2%80%93-part-13-putting-presaveaction-to-work-%e2%80%93-creating-variables/comment-page-1/#comment-99627 SharePoint: Extending the DVWP – Part 35: Putting it All Together, or | EndUserSharePoint.com Tue, 14 Sep 2010 14:02:19 +0000 http://www.endusersharepoint.com/?p=8660#comment-99627 [...] variables to the workflows, pass some form variables, and then add a few more. And we’ll add more variables that we can use with jQuery and the PreSaveAction() for form validation or writing to an audit [...] [...] variables to the workflows, pass some form variables, and then add a few more. And we’ll add more variables that we can use with jQuery and the PreSaveAction() for form validation or writing to an audit [...]

]]>
By: Jim Bob Howard http://www.endusersharepoint.com/2010/06/24/sharepoint-extending-the-dvwp-%e2%80%93-part-13-putting-presaveaction-to-work-%e2%80%93-creating-variables/comment-page-1/#comment-97632 Jim Bob Howard Wed, 01 Sep 2010 11:44:52 +0000 http://www.endusersharepoint.com/?p=8660#comment-97632 Dear Richard, It certainly could have changed if you're using SP 2010 (the SPD version wouldn't change the HTML generated by SharePoint). I don't have either, so I can't see how it would look in my environment. As with all things jQuery, your configuration is likely to generate HTML slightly differently. Which is why I usually try to walk you through how I came up with the selectors I use. That way, if yours is different, you can make the necessary adjustments. If you continue to struggle with this one, jump over to Stump the Panel (third item from the left on the menu bar above this article), so you can post code snippets and we can help you parse through what you're seeing. Blessings, Jim Bob Dear Richard,

It certainly could have changed if you’re using SP 2010 (the SPD version wouldn’t change the HTML generated by SharePoint). I don’t have either, so I can’t see how it would look in my environment.

As with all things jQuery, your configuration is likely to generate HTML slightly differently. Which is why I usually try to walk you through how I came up with the selectors I use. That way, if yours is different, you can make the necessary adjustments.

If you continue to struggle with this one, jump over to Stump the Panel (third item from the left on the menu bar above this article), so you can post code snippets and we can help you parse through what you’re seeing.

Blessings,
Jim Bob

]]>
By: Richard http://www.endusersharepoint.com/2010/06/24/sharepoint-extending-the-dvwp-%e2%80%93-part-13-putting-presaveaction-to-work-%e2%80%93-creating-variables/comment-page-1/#comment-97584 Richard Wed, 01 Sep 2010 02:59:23 +0000 http://www.endusersharepoint.com/?p=8660#comment-97584 Hi Jim, I am working with SPD 2010 and I don't see any labels (except one) for the column headers. Also, in view source, I don't see any span tags. The column headers look like this instead: Date Awarded. Has it changed in 2010? Thank you! Hi Jim,

I am working with SPD 2010 and I don’t see any labels (except one) for the column headers. Also, in view source, I don’t see any span tags. The column headers look like this instead: Date Awarded. Has it changed in 2010? Thank you!

]]>
By: SharePoint: Extending the DVWP – Part 25: Using an Audit Trail by Creating List Items with SPServices | EndUserSharePoint.com http://www.endusersharepoint.com/2010/06/24/sharepoint-extending-the-dvwp-%e2%80%93-part-13-putting-presaveaction-to-work-%e2%80%93-creating-variables/comment-page-1/#comment-92585 SharePoint: Extending the DVWP – Part 25: Using an Audit Trail by Creating List Items with SPServices | EndUserSharePoint.com Mon, 09 Aug 2010 15:39:09 +0000 http://www.endusersharepoint.com/?p=8660#comment-92585 [...] again is the jQuery script from Part 14 (see Part 13: Putting PreSaveAction() to Work — Creating Variables for an explanation of the variables), which incorporates Marc Anderson’s SPServices [...] [...] again is the jQuery script from Part 14 (see Part 13: Putting PreSaveAction() to Work — Creating Variables for an explanation of the variables), which incorporates Marc Anderson’s SPServices [...]

]]>