Normal Topic Warning Message on opening a form from a form (Read 804 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Warning Message on opening a form from a form
Apr 30th, 2008 at 2:47pm
Print Post Print Post  
I have placed a Command Button to open a form, as soon as I press the button it gives me warning the current form is changed and it has not been committed. Well, I am not ready to save the form yet. If I choose yes, it will take me to the other form. If I place Formcommit () command, it will not work as it will ask me to acknowledge the restriction fields that needed to have value before the record could be saved.

One does not get such warning when a form is opened from a Menu page. Moreover both standalone forms can open side by side (bottome tabs showing various forms being opened and the modes) without any one of them needed to be committed and one can go one form to other without such warning. I could open four different forms Menu page and all of them are open without any such warning.  I do not understand the need for such warning and one additional click. How could I avoid it?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Warning Message on opening a form from a form
Reply #1 - Apr 30th, 2008 at 2:49pm
Print Post Print Post  
Can you be more specific about your command button? Is it opening a different form in another tab, or are you using Switch To Alternate Form?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Warning Message on opening a form from a form
Reply #2 - Apr 30th, 2008 at 3:03pm
Print Post Print Post  
It is  opening a different form in another tab.

Following is the code.

Code
Select All
var vTmp as Int
var vRecord as String

//FormCommit ("Physical")
vRecord = @ClientLocalValue ("CurrentRecord")


vTmp = @SelectTreeItem(@Application + "!Forms!Search/Update!Index!Tracker")

/*
FormRunCustomProgram ("Tracker:Search", "RecNumber = vRecord")
*/
//above code is not working for some unknown reasons

 



The above code is not working for some unknown reason. So, I have to use On retrieve Form Open event that place the @ClientLocalValue ("CurrentRecord") in one of the element and Load the Retrieve spec. but that creates another problem that when I want to search/update in that particular layout it would not let me fill out retrieve spec form.

Code
Select All
On retrieve form open

var vStr as String

RecNumber = @ClientLocalValue ("CurrentRecord")

vStr = @SpecCommand (2, 1, "")
 



I believe, I have to use some conditional statement here to avoid it.  Any suggestions? Thanks.
« Last Edit: Apr 30th, 2008 at 4:25pm by Bharat_Naik »  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Warning Message on opening a form from a form
Reply #3 - May 1st, 2008 at 8:23pm
Print Post Print Post  
Hello Bharat,

You can get around that warning message with the following code.

Code
Select All
var vTmp as Int
var vRecord as String

vRecord = @ClientLocalValue ("CurrentRecord")

WarningLevel(0)
vTmp = @SelectTreeItem(@Application + "!Forms!Search/Update!Index!Tracker")
WarningLevel(1) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Warning Message on opening a form from a form
Reply #4 - May 1st, 2008 at 8:38pm
Print Post Print Post  
Thanks Ray. You are the saviour!!!
  
Back to top
 
IP Logged