Rizwan,
The of_SetToNullIfEmpty() only applies to the little edit box that the user
types information into. (You don't actually edit the datawindow column
directly. An invisible edit box is placed by PB above the column and
your changes are typed in there). If the user doesn't type in the column,
the column will still have the original contents.
If you insert a row into the datawindow by your script, you will need
to set your column to null with a script to make the required column service
work.
If you are already doing this, you will need to examine your code in the
debugger to see if the column has been set to a string or zero value
by the program somewhere. This one happened to us here when the person
who programmed the corporate layer before me set the primary key columns
of the datawindow to 0 instead of Null.
regards,
Jim
-----Original Message-----
From: rizwan hussain [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 11, 2000 10:48 AM
To: [EMAIL PROTECTED]
Subject: PFCSIG Required Column Service for Edit Masks
I have a DW with a column as required and have Edit Mask. I made the changes
in of_SetToNullIfEmpty() to include columns with Edit masks (as mentioned by
Sharon Buntz at http://www.pfcguide.com). I found out that the Required
Column Service will not pick that column as required value missing if the
column's value is an empty string which make sense since Edit Masks do not
have Empty
String is Null property. Thats why of_SetToNullIfEmpty() is changed to
accomodate this. The problem is of_SettoNullIfEmpty() is called from u_dw's
itemerror event only and in my case itemerror event is not trigerring
somehow.
So here are my findings :
Required Column Service (Enhance version) will not pick a required column
with Edit Mask as required value missing :
1. if there is a new row, user type something in that column and then delete
it
2. if it is an old row, user type something in that column and then delete
it
3. if it is an old row, there is nothing in that column and user do not
touch that column (although in DW I mentioned that column as required)
Only time it will work correctly is when it is a new row and user do not
touch the column.
My question is what i am doing wrong? The solution come to my mind is to
call of_SettoNullIfEmpty() for all required coulmns before the validation
but I was
thinking i may got a better solution from other people.
Any suggestion will be helpful.
Rizwan
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS,
ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]