Unnecessary message displayed: 'Do you want to save the changes you made?' [message #327013] |
Fri, 13 June 2008 07:02 |
syed_hussain
Messages: 6 Registered: November 2007 Location: India
|
Junior Member |
|
|
Hello All,
I have developed a new form and in that form it has 3-4 LOVS. I have created few records with it.
This LOV will contain the value as ID and Description.
The value returned from LOV(ID) will be attached to a field having the property as 'Database Item' to 'Yes' and
The value returned from LOV(Description) will be attached to a field having the property as 'Databbase Item' to 'No'
The LOV has been attached to the feild having the property as 'Databbase Item' to 'No'.
In the POST QUERY trigger i have written a code which will extract the 'Description' of the item based on the item 'ID'
and it is extracting all the data but whenever i close the form it is popping a message 'Do you want to save the changes you made?'. Though i havent done any changes.
Can you please help me out in this.
|
|
|
|
|
|
Re: Unnecessary message displayed: 'Do you want to save the changes you made?' [message #327196 is a reply to message #327013] |
Sat, 14 June 2008 11:31 |
Martin Eysackers
Messages: 80 Registered: October 2005 Location: Belgium
|
Member |
|
|
clear_form ??
what if a user does make some changes, he will then no longer have the chance to save them !
you are probably filling out a database item in your POST-QUERY
or a non database item which has a when-validate-item which in turn changes a database item
OR
the validate from list for your description item is set to yes
which causes forms to check through your lov which in turn returns the id in your database item
the solution to all this is to mark the item you are filling in your post-query as valid :
set_item_property(<your item>, item_is_valid, property_true);
I always do this for items I fill through a post-query (even for non database items)
[Updated on: Sat, 14 June 2008 11:32] Report message to a moderator
|
|
|
Re: Unnecessary message displayed: 'Do you want to save the changes you made?' [message #327201 is a reply to message #327196] |
Sat, 14 June 2008 19:18 |
syed_hussain
Messages: 6 Registered: November 2007 Location: India
|
Junior Member |
|
|
Thank Martin,
The information which i got above really helped me alot.
And I found the solution for it.The Solution is
I have attached the LOV to a non-database item and that LOV will return two values i.e. ID and Description.
ID value will be returned into database item and
Description value will be returned into non-database item from the LOV.
In POST-QUERY Trigger I have written the code such that based on the ID value(DB item) it will extract the Description value(non database item).
The item for which LOV has attached is having the property(Validate from List as Yes).
So I have changed the property of the item as
POST_QUERY(Block Level)
set_item_property('blocnmae.itemname', 'VALIDATE_FROM_LIST', property_false);
WHEN-NEW-RECORD-INSTANCE(Block Level)
set_item_property('blocnmae.itemname', 'VALIDATE_FROM_LIST', property_true);
Now its working fine, thanks for your in time help.
Regards
Syed Hussain
|
|
|