Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) On Element Change executing in Retrieve Spec (Read 2271 times)
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
On Element Change executing in Retrieve Spec
Apr 13th, 2004 at 2:50pm
Print Post Print Post  
Mark,

Were you aware that On Element Change is executing in the retrieve spec?

This is only happening to subforms while in retrieve spec of the parent form, then entering a value in a subform element. It does NOT happen if in the retrieve spec for the subform alone.

I checked previous versions, and it started with version 1.0.2. Since this was at the same time that On Retrieve Spec Open was introduced, was this on purpose?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: On Element Change executing in Retrieve Spec
Reply #1 - Apr 13th, 2004 at 4:03pm
Print Post Print Post  
Yup - found and fixed.

...but then again - anyone suppose it might be useful...?

Naw...found and fixed.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: On Element Change executing in Retrieve Spec
Reply #2 - Apr 13th, 2004 at 5:09pm
Print Post Print Post  
Excellent! 8)
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: On Element Change executing in Retrieve Spec
Reply #3 - Apr 13th, 2004 at 6:53pm
Print Post Print Post  
I don't know Carl, I've been playing with my copy that I left "unfixed" and its pretty slick. You can change a search spec based on the contents of search spec as the user is filling it out. That means you can do neat stuff like limit what the user is allowed to search for - even within an LE they have access to. You can revise and correct search specs, or even add additional information. Combined with the @mode() function - this could be pretty powerful. Wink
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: On Element Change executing in Retrieve Spec
Reply #4 - Apr 13th, 2004 at 9:22pm
Print Post Print Post  
Quote:
...this could be pretty powerful.

Yeah, at first I kind of thought maybe this was on purpose. But then I realized it was only working in subforms, which indicated to me that it must have been by mistake.

What about an On Element Entry event in retrieve spec?

The reason I say that is, On Retrieve Spec Open can have a popup list of names of companies like the example in the supplement manual, but what if that's not the kind of search someone wants? What if they just want to check for "MAX 10" in a date field? With an On Element Entry event instead of an On Retrieve Spec Open event, they wouldn't have to be bothered with the list of companies. They would simply open the retrieve spec, and click on the element that they want; OR they could click on the companies element to have the list popup.

For that matter each element could be programmed have a list of the most common search specs that they use. It would probably be a little simpler/quicker than using saved specs.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: On Element Change executing in Retrieve Spec
Reply #5 - Apr 13th, 2004 at 10:02pm
Print Post Print Post  
Mark, the more I think about it, the better it sounds.

With a little programming, you could use a popup list not only to select one search name, but to build a list of names separated by semicolons. (name1; name2; name3; name4, etc.)

I suppose this could be done with On Retrieve Spec Open, but it could be made less intrusive if we had element entry and exit events available in retrieve spec.

What about setting it up so that the only code that would function in the retrieve spec, would be code that specifically uses @mode. Otherwise things could get out of control if all the code executed in search mode.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: On Element Change executing in Retrieve Spec
Reply #6 - Apr 15th, 2004 at 11:32am
Print Post Print Post  
Quote:
What about setting it up so that the only code that would function in the retrieve spec, would be code that specifically uses @mode.

Mark, would it just be easier to to add new events instead? Maybe something like "On Retrieve Spec Element Entry" and "On Retrieve Spec Element Exit"?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: On Element Change executing in Retrieve Spec
Reply #7 - Apr 15th, 2004 at 11:51am
Print Post Print Post  
Maybe. Whatever is done will have to be flown by marketing and then designed in. At this point, I wouldn't want to speculate too far.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: On Element Change executing in Retrieve Spec
Reply #8 - Apr 16th, 2004 at 10:31am
Print Post Print Post  
Aww, shucks! Wink
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
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: On Element Change executing in Retrieve Spec
Reply #9 - Apr 16th, 2004 at 1:23pm
Print Post Print Post  
The way it is now, the retrieve spec Open code works only on open of retrieve spec or search mode.  I thought one could enter code into any event when it is used with @mode ( ) command, such as

Name:
Relationship:
City:

On Element Entry event of LE Name

If @mode ( ) = 2 and City = "Chicago" and Name = "" then
        {
              Name = "Johnson"
              Relationship = "Father"
         }

Obviously this does not work. It seems like it is possible to have such capability and it surfaced for at least one event (On element change) as a bug.

If with the use of @mode ( ) command, retrieve Spec programming is made available to various events, it will be a great enhancement.  If such features are made available, retrieve spec will be more interactive and dynamic.  I really wished that instead of removing one such capabilities as a bug, it should have been made available to work on the mainform also. I hope, Mark is listening.  

I like Carl's suggestion to add such retrieve spec programming feature to element entry and element exit event. With the use of @mode ( ) command such programming will be non-intrusive to the other modes such as add and update.  Thank you.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: On Element Change executing in Retrieve Spec
Reply #10 - Apr 16th, 2004 at 1:49pm
Print Post Print Post  
We're listening, Bharat. Our main issue with simply enabling this for all events is that all of your existing and future code would have to be wrapped in @Mode to prevent it from running at a Retrieve Spec. There a "more trouble than it's worth" factor here for most users. Regular form programming is much more prevalent. We don't want to add an order of magnitude of complexity to a ordinary user simply adding two values together just to enable a fairly esoteric feature like running OnImmediateChange from a Retrieve Spec.

This ability sounds cool to us also, but we can't lose sight of the big picture.  Mark and I don't get to make these decisions unilaterally. Marketing has to agree that this is a good use of our resources. Once that decision is made, we have to design in a solution that won't cause grief to  a large portion of our users.   Smiley
  

- 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: On Element Change executing in Retrieve Spec
Reply #11 - Apr 16th, 2004 at 1:56pm
Print Post Print Post  
Quote:
Our main issue with simply enabling this for all events is that all of your existing and future code would have to be wrapped in @Mode to prevent it from running at a Retrieve Spec. There a "more trouble than it's worth" factor here for most users.


Thanks Erika.  Could it be done that it will work in Retrieve Spec only when @mode ( ) = 2 is used ?  This  should eliminate backward compatibility problem.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: On Element Change executing in Retrieve Spec
Reply #12 - Apr 16th, 2004 at 2:22pm
Print Post Print Post  
Quote:
Thanks Erika.  Could it be done that it will work in Retrieve Spec only when @mode ( ) = 2 is used ?  This  should eliminate backward compatibility problem.


Unfortunately, what you suggest is not logically possible without some sort of assistance from the deity of your choice.

Take this statement, for example:
Code
Select All
Name = "Arbuckle" 


It is not wrapped in @Mode at all. Therefore, it doesn't specifically indicate that we shouldn't run from a Retrieve Spec... So, should we run it? We have no way to know.

However, you say no. It's not wrapped in @Mode() = 2, so don't run it. Well, okay, but it's not always that simple.

As an example of the much more difficult case, look at this event program.
Code
Select All
var vName as String

vName = "Arbuckle"
If @Mode() = 2
{
    LastName = vName
}
LastName = "Godfrey"
 


Which portion of the example above do we run? If we only run the part inside the @Mode, then we have not set the variable.

We haven't even mentioned the compiler issues. We can't only compile parts of your code. We have to compile all of it. Otherwise, we won't even have the variable being used inside the @Mode condition.

What you, as a human, manage automatically by looking at your code and saying "Oh, well I'll only pick out the parts I want." is an extraordinarily complex task for a machine that, on it's best day, has the intelligence of a caterpillar.  Smiley
  

- 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: On Element Change executing in Retrieve Spec
Reply #13 - Apr 16th, 2004 at 2:35pm
Print Post Print Post  
Erika,
Thanks for listening. I firmly believe that you will find a way to accomodate such great features some kind of way.  You are all geniuses out there. What do we know? Well, we know you will find a way.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: On Element Change executing in Retrieve Spec
Reply #14 - Apr 16th, 2004 at 3:03pm
Print Post Print Post  
Quote:
Yea...like a way to get a hierarchical ASCII file directly out of Q&A.  Run it by marketing. Grin


We really can't do anything to Q&A itself, Walt. This is much more a job for all those clever power users out there who figured out so many inventive ways to get Q&A to jump through various hoops.  Wink
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print