Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to avoid the required column validation msg using modify

5 posts in DataWindow Last posting was on 2009-06-11 21:26:34.0Z
Bojarajan Posted on 2009-06-09 21:39:24.0Z
From: "Bojarajan" <tbojarajan@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Organization: 65.112.250.245
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: How to avoid the required column validation msg using modify
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a2ed68c$1@forums-1-dub>
Date: 9 Jun 2009 14:39:24 -0700
X-Trace: forums-1-dub 1244583564 10.22.241.152 (9 Jun 2009 14:39:24 -0700)
X-Original-Trace: 9 Jun 2009 14:39:24 -0700, vip152.sybase.com
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89454
Article PK: 418645

Hi,

I am trying to avoid the required column validation messages when i am using the
modify function. For example,

I am using the modify function to make the column as required field in
itemchanged event. But somepoint i need to avoid the required column validation
so i am using the below code,

this.modify("repair_hour.editmask.required=no") the problem is, it is generating
the validation message whenever I do this code.

Please let me know how to avoid the default message. Any ideas.
Thanks
Bojarajan.
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-06-10 03:37:32.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a2ed68c$1@forums-1-dub>
Subject: Re: How to avoid the required column validation msg using modify
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a2f2a7c$1@forums-1-dub>
Date: 9 Jun 2009 20:37:32 -0700
X-Trace: forums-1-dub 1244605052 10.22.241.152 (9 Jun 2009 20:37:32 -0700)
X-Original-Trace: 9 Jun 2009 20:37:32 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89455
Article PK: 418647

If a column has required='yes' and is changed to null, and then loses focus,
it won't fire the ItemChanged event. It WILL fire ItemError, and that's
where you can return 2 to ignore the null when appropriate.
If you are in the ItemChanged event, and the new value is null then required
must have been 'no', so you may want to use IF IsNull(data). Required is
also useful in a pre-save method - walk the columns and if required-'yes'
and content is null, fail. The validation for required only happens if the
column gets focus and then loses focus without having a non-null value.

--
Report Bugs: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Bojarajan" <tbojarajan@gmail.com> wrote in message
news:4a2ed68c$1@forums-1-dub...
> Hi,
>
> I am trying to avoid the required column validation messages when i am
> using the
> modify function. For example,
>
> I am using the modify function to make the column as required field in
> itemchanged event. But somepoint i need to avoid the required column
> validation
> so i am using the below code,
>
> this.modify("repair_hour.editmask.required=no") the problem is, it is
> generating
> the validation message whenever I do this code.
>
> Please let me know how to avoid the default message. Any ideas.
> Thanks
> Bojarajan.
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Bojarajan Posted on 2009-06-11 21:26:34.0Z
From: "Bojarajan" <tbojarajan@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Organization: 65.112.250.245
References: <4a2ed68c$1@forums-1-dub> <4a2f2a7c$1@forums-1-dub>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: How to avoid the required column validation msg using modify
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a31768a$1@forums-1-dub>
Date: 11 Jun 2009 14:26:34 -0700
X-Trace: forums-1-dub 1244755594 10.22.241.152 (11 Jun 2009 14:26:34 -0700)
X-Original-Trace: 11 Jun 2009 14:26:34 -0700, vip152.sybase.com
Lines: 52
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89471
Article PK: 418662

Hi Jerry

Thanks for your response. I got the idea from your suggestion. I tried another
option also, before modify the required colum as "no", i am
manually set the validationmsg as null. it is working fine i am not getting the
default message now.

Thanks
Bojarajan.

On 9 Jun 2009 20:37:32 -0700,
in sybase.public.powerbuilder.datawindow

Jerry Siegel [TeamSybase] <jNOsSPAMsiegel@yahoo!.com> wrote:
>If a column has required='yes' and is changed to null, and then loses focus,
>it won't fire the ItemChanged event. It WILL fire ItemError, and that's
>where you can return 2 to ignore the null when appropriate.
>If you are in the ItemChanged event, and the new value is null then required
>must have been 'no', so you may want to use IF IsNull(data). Required is
>also useful in a pre-save method - walk the columns and if required-'yes'
>and content is null, fail. The validation for required only happens if the
>column gets focus and then loses focus without having a non-null value.
>
>--
>Report Bugs: http://case-express.sybase.com/cx/welcome.do
>Product Enhancement Requests:
>http://my.isug.com/cgi-bin/1/c/submit_enhancement
>
>
>"Bojarajan" <tbojarajan@gmail.com> wrote in message
>news:4a2ed68c$1@forums-1-dub...
>> Hi,
>>
>> I am trying to avoid the required column validation messages when i am
>> using the
>> modify function. For example,
>>
>> I am using the modify function to make the column as required field in
>> itemchanged event. But somepoint i need to avoid the required column
>> validation
>> so i am using the below code,
>>
>> this.modify("repair_hour.editmask.required=no") the problem is, it is
>> generating
>> the validation message whenever I do this code.
>>
>> Please let me know how to avoid the default message. Any ideas.
>> Thanks
>> Bojarajan.
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp
>
>


Chris Pollach Posted on 2009-06-10 11:37:07.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a2ed68c$1@forums-1-dub>
Subject: Re: How to avoid the required column validation msg using modify
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a2f9ae3$1@forums-1-dub>
Date: 10 Jun 2009 04:37:07 -0700
X-Trace: forums-1-dub 1244633827 10.22.241.152 (10 Jun 2009 04:37:07 -0700)
X-Original-Trace: 10 Jun 2009 04:37:07 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89458
Article PK: 418649

Hi Bojarajan;

I would add a new instance variable (ie: ib_ignore_errors) and set this
to TRUE before you issue the Modify ( ) command. In the ItemError event on
the DW control or DataStore, check the variable and return a 2 if set ....

IF ib_ignore_errors = TRUE Then
Return 2 // Accept anything
else
// normal error checking
END IF

After the Modify ( ) - set the "ib_ignore_errors" variable back to
false. I think that should work nicely.

HTH

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com

"Bojarajan" <tbojarajan@gmail.com> wrote in message
news:4a2ed68c$1@forums-1-dub...
> Hi,
>
> I am trying to avoid the required column validation messages when i am
> using the
> modify function. For example,
>
> I am using the modify function to make the column as required field in
> itemchanged event. But somepoint i need to avoid the required column
> validation
> so i am using the below code,
>
> this.modify("repair_hour.editmask.required=no") the problem is, it is
> generating
> the validation message whenever I do this code.
>
> Please let me know how to avoid the default message. Any ideas.
> Thanks
> Bojarajan.
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Bojarajan Posted on 2009-06-11 21:24:12.0Z
From: "Bojarajan" <tbojarajan@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Organization: 65.112.250.245
References: <4a2ed68c$1@forums-1-dub> <4a2f9ae3$1@forums-1-dub>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: How to avoid the required column validation msg using modify
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a3175fc@forums-1-dub>
Date: 11 Jun 2009 14:24:12 -0700
X-Trace: forums-1-dub 1244755452 10.22.241.152 (11 Jun 2009 14:24:12 -0700)
X-Original-Trace: 11 Jun 2009 14:24:12 -0700, vip152.sybase.com
Lines: 61
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89470
Article PK: 418660

Hi Chris,

Thanks for your response. I think this will resolve my issue. I tried another
option also, before modify the required colum as "no", i am
manually set the validationmsg as null. it is working fine i am not getting the
default message now.

Thanks
Bojarjan


On 10 Jun 2009 04:37:07 -0700,
in sybase.public.powerbuilder.datawindow

Chris Pollach <cpollach@travel-net.com> wrote:
>Hi Bojarajan;
>
> I would add a new instance variable (ie: ib_ignore_errors) and set this
>to TRUE before you issue the Modify ( ) command. In the ItemError event on
>the DW control or DataStore, check the variable and return a 2 if set ....
>
>IF ib_ignore_errors = TRUE Then
> Return 2 // Accept anything
>else
> // normal error checking
>END IF
>
> After the Modify ( ) - set the "ib_ignore_errors" variable back to
>false. I think that should work nicely.
>
>HTH
>
>--
>Regards ... Chris
>ISUG - NA RUG Director
>http://chrispollach.pbdjmagazine.com
>
>
>"Bojarajan" <tbojarajan@gmail.com> wrote in message
>news:4a2ed68c$1@forums-1-dub...
>> Hi,
>>
>> I am trying to avoid the required column validation messages when i am
>> using the
>> modify function. For example,
>>
>> I am using the modify function to make the column as required field in
>> itemchanged event. But somepoint i need to avoid the required column
>> validation
>> so i am using the below code,
>>
>> this.modify("repair_hour.editmask.required=no") the problem is, it is
>> generating
>> the validation message whenever I do this code.
>>
>> Please let me know how to avoid the default message. Any ideas.
>> Thanks
>> Bojarajan.
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp
>
>