how to show message 'do you want to save changes ?? ' [message #392947] |
Thu, 19 March 2009 14:45 |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
Hi,
i have 2 datablocks. one is 'A' other is 'B'.
datablock 'B' is inherited from 'A'.
i have a field called ID on 'B'.
i have same field ID on 'A'.
ID is lov field.
now what i want is, whenever i select value from lov into ID and click on any other item or tab page, i want to show the message "do u want to save changes?".
if i click yes,it should commit.
iam unable to understand in which trigger i should write the alert to show the message. i tried in different triggers which i felt were correct. but its not working.
and when i click on tabpage which has datablock 'A', the value which i gave in ID field on 'B' should be displayed in ID field of 'A'.
|
|
|
|
Re: how to show message 'do you want to save changes ?? ' [message #393177 is a reply to message #393030] |
Fri, 20 March 2009 11:44 |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
both items are on different datablocks. i cant use copy from or synchronize in this case.
in when-tab-page-changed trigger i wrote:
go_item('A.ID');
execute_query;
this works for me for my second question .
now i want to show exactly same value in A.ID which i have selected in B.ID.
A block is a multirow. i want to show the value that was recently selected on B.ID.
about first question, do you mean that whenever i select a value from LOV and without saving if i click on any tab then form will show message to save ??
but iam not getting that message. was it not displayed somehow by using system.message_level??
where can i see this default saving message by forms?? can i be able to change it??
|
|
|
|
|
Re: how to show message 'do you want to save changes ?? ' [message #393853 is a reply to message #393399] |
Tue, 24 March 2009 12:35 |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
can i use get_record_property function??
i want to give last record number as the first arguement of get_record_property function. how can i give this number?? what function should i use to get last record number of a block??
i can't give :last_record as first argument.
do i have to write it in when-tab-page-changed trigger??
|
|
|
|
Re: how to show message 'do you want to save changes ?? ' [message #395083 is a reply to message #393853] |
Tue, 31 March 2009 04:50 |
|
nastyjillu wrote on Tue, 24 March 2009 22:35 | can i use get_record_property function??
i want to give last record number as the first arguement of get_record_property function. how can i give this number?? what function should i use to get last record number of a block??
i can't give :last_record as first argument.
do i have to write it in when-tab-page-changed trigger??
|
last_record;
will move the cursor to the last record of the block;
then u can use to get the status of last record using get_record_peroperty function.
=================
but can u explain your actual requirements, since this is not a standard approach of saving / commiting forms.
|
|
|
|
|