Comments on: SharePoint: Extending the DVWP – Part 32: Filling in Default Data on the insert Template with Multiple DVWPs http://www.endusersharepoint.com/2010/08/31/sharepoint-extending-the-dvwp-%e2%80%93-part-32-filling-in-default-data-on-the-insert-template-with-multiple-dvwps/ 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/08/31/sharepoint-extending-the-dvwp-%e2%80%93-part-32-filling-in-default-data-on-the-insert-template-with-multiple-dvwps/comment-page-1/#comment-108932 Brad Tue, 26 Oct 2010 18:03:05 +0000 http://www.endusersharepoint.com/?p=9493#comment-108932 No, I haven't looked at trigger but I'm pretty happy with the workflow for now. The issues I was having with the commit had to do with that the user wasn't changing the field so the dvwp didn't want to save the row. You might say that is correct -- nothing to save if the user hasn't changed it. Well, I was changing the values of some of the fields as the form loaded -- prepopulating some of the answers with what we had stored in another database. Business rules needed to keep the question on the form, even though we knew the answer. So, if I loop through the fields and append a space to the end, the dvwp thinks the field has changed and it saves it. The dvwp in multi-item edit mode doesn't save the data if nothing changed since the last page load. No, I haven’t looked at trigger but I’m pretty happy with the workflow for now.

The issues I was having with the commit had to do with that the user wasn’t changing the field so the dvwp didn’t want to save the row. You might say that is correct — nothing to save if the user hasn’t changed it. Well, I was changing the values of some of the fields as the form loaded — prepopulating some of the answers with what we had stored in another database. Business rules needed to keep the question on the form, even though we knew the answer.

So, if I loop through the fields and append a space to the end, the dvwp thinks the field has changed and it saves it. The dvwp in multi-item edit mode doesn’t save the data if nothing changed since the last page load.

]]>
By: Jim Bob Howard http://www.endusersharepoint.com/2010/08/31/sharepoint-extending-the-dvwp-%e2%80%93-part-32-filling-in-default-data-on-the-insert-template-with-multiple-dvwps/comment-page-1/#comment-108930 Jim Bob Howard Tue, 26 Oct 2010 17:55:41 +0000 http://www.endusersharepoint.com/?p=9493#comment-108930 Have you looked at .trigger() in jQuery to see if you can make your changes happen? Also, make sure you're updating the right control. Some controls (People Picker, Date Picker, for example) have one control for display, but the data-bound control is actually hidden on the page. (Another example would be a select with over 20 options.) So, you might be changing the display, but not the data-bound control. If you find the right control, the OK or Save button should commit the data in that control. Blessings, Jim Bob Have you looked at .trigger() in jQuery to see if you can make your changes happen?

Also, make sure you’re updating the right control. Some controls (People Picker, Date Picker, for example) have one control for display, but the data-bound control is actually hidden on the page. (Another example would be a select with over 20 options.) So, you might be changing the display, but not the data-bound control.

If you find the right control, the OK or Save button should commit the data in that control.

Blessings,
Jim Bob

]]>
By: Brad http://www.endusersharepoint.com/2010/08/31/sharepoint-extending-the-dvwp-%e2%80%93-part-32-filling-in-default-data-on-the-insert-template-with-multiple-dvwps/comment-page-1/#comment-107506 Brad Wed, 20 Oct 2010 19:25:21 +0000 http://www.endusersharepoint.com/?p=9493#comment-107506 Jim Bob, I'm also trying to fill in some default values on one of my forms, but the data isn't being saved. I think this is because when the form loads and the user hits save the row hasn't changed. I still need the row to be saved, I'm just pre-populating the data thru the query string, it's persistant due to validation/postback issues, or it's pre-populated thru the select statement. Mr Florian has a pretty good description here: http://social.msdn.microsoft.com/forums/en-US/sharepointcustomization/thread/80712782-36fd-42d2-9c12-dd54768efa87 So, your cascading drop-downs work becuase there still some user interaction on that row. If I could find out a different option for the ASP TextChanged, like ForceSave or AlwaysSave it would work. But I can't find one. Jim Bob,

I’m also trying to fill in some default values on one of my forms, but the data isn’t being saved. I think this is because when the form loads and the user hits save the row hasn’t changed.

I still need the row to be saved, I’m just pre-populating the data thru the query string, it’s persistant due to validation/postback issues, or it’s pre-populated thru the select statement.

Mr Florian has a pretty good description here: http://social.msdn.microsoft.com/forums/en-US/sharepointcustomization/thread/80712782-36fd-42d2-9c12-dd54768efa87

So, your cascading drop-downs work becuase there still some user interaction on that row.

If I could find out a different option for the ASP TextChanged, like ForceSave or AlwaysSave it would work. But I can’t find one.

]]>