Home » Developer & Programmer » Forms » Doubt regarding D2k
Doubt regarding D2k [message #16420] Sat, 27 November 2004 00:23 Go to next message
Kasim
Messages: 22
Registered: August 2004
Junior Member
Hi all,

Sorry to post my doubt in this session. My doubt is regarding to LOV validation in D2k.

I have a Non-database item named - Group Name attached to a LOV. Now I have to validate that field when any invalid value is entered. Believe, we cannot set the Validate from list property to "Yes" for that field, since it is a non-database item . Rather I tried as,

1. Setted the validate from list to "No" for the item - Group name.

2. In POST-QUERY (BLOCK-LEVEL)

IF :SYSTEM.BLOCK_STATUS IN ('NEW','CHANGED') THEN
 IF :SYSTEM.RECORD_STATUS IN ('NEW','CHANGED','INSERT') THEN
   SET_ITEM_PROPERTY('CMS_T_SYS_GROUP_USER.GROUP_NAME', VALIDATE_FROM_LIST,PROPERTY_TRUE);
 ELSE
   SET_ITEM_PROPERTY('CMS_T_SYS_GROUP_USER.GROUP_NAME', VALIDATE_FROM_LIST,PROPERTY_FALSE);
 END IF;
END IF;

3. In WHEN-NEW-BLOCK-INSTANCE TRIGGER (BLOCK LEVEL)

IF :SYSTEM.BLOCK_STATUS IN ('NEW','CHANGED') THEN
  SET_ITEM_PROPERTY('CMS_T_SYS_GROUP_USER.GROUP_NAME', VALIDATE_FROM_LIST,PROPERTY_TRUE);
ELSE
  SET_ITEM_PROPERTY('CMS_T_SYS_GROUP_USER.GROUP_NAME', VALIDATE_FROM_LIST,PROPERTY_FALSE);
END IF;

Even after this I couldn't validate the item from LOV. When I enter invalid value the navigation moves to next item without any validation from LOV.

Is there is any other ways to get my problem to be sorted out. Kindly help me out in this regard.

Regards,

Smita

 

 

 

 
icon7.gif  Re: Doubt regarding D2k [message #145991 is a reply to message #16420] Tue, 08 November 2005 01:34 Go to previous messageGo to next message
deegee
Messages: 1
Registered: November 2005
Location: Delhi
Junior Member

Hi, With reference to your doubt I suggest
you to use when validate trigger on your
aforesaid non database field.
Re: Doubt regarding D2k [message #145994 is a reply to message #145991] Tue, 08 November 2005 01:49 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Moved to Forms. Pay attention where you post your questions, the Newbie board is not the IN-box for the mods Wink.

MHE
Re: Doubt regarding D2k [message #146124 is a reply to message #16420] Tue, 08 November 2005 15:50 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
An LOV can be applied to any field, either dfatabase or non-database. Please remove the Post-Query and When-New-Block-Instance triggers as they are at the wrong level. The first fires when a record is retrieved, not when you create a new record (record_status=insert), and the second is when you arrive at the block, not as you are moving betweenrecords in the block.

Just turn the validation on during the build and it should work okay.

David
Previous Topic: another challenging task for gurus
Next Topic: Online site for D2K Forms 6i practice
Goto Forum:
  


Current Time: Fri Sep 20 04:44:45 CDT 2024