Hi there,Is there any way out to revert the Interwoven OnSaveValid function? I have a custom script which checks for some of the values in combination with each other and validates the same.The scenario here is when the user clicks for SAVE on the form.... as per IWOV it first calls up OnSaveValid function... and then my custom script. Now .. if my custom script returns error ... then it should also revert to the OnSavevalid function as well. As on error from custom script.... the user can remove the data from the mandatory fields and still DCR would be saved. All suggestions and work arounds are welcome.
function Validator(){// do stuff and go on setting flags// if all flags are truesaveyourForm(); //call this function which will actually do the save handling }
Adam,Waiting for your suggestions and comments.
Why are you waiting for me?What do you mean by 'revert'?It seems to me that this is reasonably well covered in the manuals (validating forms with both OOTB and custom code)
Waiting.... bcoz i was hoping a solution from you.Revert... just means that once Onsavevalid function clears up ... and my custom function wants everything to be reverted. How to do that?As far as Impressive manuals are concerned... i am unable to see any solutions over this issue.
Again - what do you mean by 'revert' - generally this means to restore old values - are you expecting that when any part of the DCT is found to be invalid that it should replace whatever it finds in those fields with whatever was in those fields before they were changed??I believe there is a way to get the old values of items in DCTs (again - look at the manuals) - but that seems a rather heavy-handed approach.I would think that you'd want your validation routine to mark the specific fields it has problems with as invalid and then return - the DCT should not allow a DCR to be saved with explicitly marked invalid fields.
If you could post a sample scenario with DCT, DCR that might help understand better about the issue.
Sorry... i cant... as i have in sign of a privacy policy. Also all of my legacy handed-over code is in relation to each other file.
I mean "revert" is to only revert the status of OnSaveValid function not the values on the DCR... so that after my custom error ... when the user clciks on save... it again goes through the OnSaveValid function.I am using redraw and redrawlabels but not finding what i needed. Actually i need to mark the DCR to be invalid. I hope this time i have made the query more clear.
I would think that you'd want your validation routine to mark the specific fields it has problems with as invalid and then return - the DCT should not allow a DCR to be saved with explicitly marked invalid fields.
If you asked Adam for help - specifically... Why didn't you read his reply ?There is no such animal as "invalid" DCR. You should invalidate field(s) that failed your custom check:myItem.setValid(false);
... i have asked only and only Adam's help. I was just waiting for his reply... nothing more than this.
It is not ... i have asked only and only Adam's help. I was just waiting for his reply... nothing more than this.
That's really not what this forum is about... Yeah, Adam asks a lot of help, but he does it by choice... Asking a question and waiting only for his answer is a bit presumptuous on your part... This is a community and people help others by choice... Ignoring the rest of the community awaiting one persons response is a little inconsiderate...If you want and expect only Adam's help, I suggest you start putting him on your payroll...~Jeff
That's really not what this forum is about... Yeah, Adam asks a lot of help, but he does it by choice...
function showInvalid(itemInvalid) { itemInvalid.setValid(false); IWDatacapture.setHighlightMode(true);}function showValid(item) { item.setValid(true); IWDatacapture.setHighlightMode(true);}
if (something){ showInvalid(item_var);}else { showValid(item_var);}
but then there is also a thing called as 'expectation' of a prompt response. and that is all.
There is a little misunderstanding here, I'm afraid.When I asked "Why didn't you read his reply?" I simply pointed out the factthat the question was asked, answered by Adam and then immediatelyasked again.There is nothing presumptuous in kaalraa post, just a bad wording
While I do from time to time ask for help - I think perhaps you meant provides?