Hot Topic (More than 10 Replies) Differentiate programmed change from manual? (Read 1276 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Differentiate programmed change from manual?
Sep 18th, 2007 at 2:28pm
Print Post Print Post  
Is there any way that Sesame can tell the difference between a change in an element that's made by programming from one that's made manually?
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Differentiate programmed change from manual?
Reply #1 - Sep 18th, 2007 at 2:44pm
Print Post Print Post  
Infinity wrote on Sep 18th, 2007 at 2:28pm:
Is there any way that Sesame can tell the difference between a change in an element that's made by programming from one that's made manually?

Not really. But, if you are changing something in programming then that same program should be able to take whatever action needs to be taken because you changed something in programming instead of manually.

Is there something specific you are trying to manage?
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Differentiate programmed change from manual?
Reply #2 - Sep 18th, 2007 at 3:07pm
Print Post Print Post  
The Labor tab of my Workorder form has five rows for labor categories.  When the user chooses a category, an XLookup is performed to an external Labor database which retrieves the Straight Time rate and the Overtime rate, and plunks the values in the appropriate elements.

My dispatcher wants to be able to overwrite the Straight Time value and have the Overtime value recalculate automatically (1.5 X).  That's easy enough to do, but if I put the programming in on-element-change it will run even when the XLookup performs, which really isn't necessary.  So I was hoping I could program in "if the user changed this manually then OT=ST * 1.5" and so on.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Differentiate programmed change from manual?
Reply #3 - Sep 18th, 2007 at 3:23pm
Print Post Print Post  
You can do this with a flag, Scott, but the mechanics of it will probably take more time than simply doing the multiplication. Is it actually doing any harm?
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Differentiate programmed change from manual?
Reply #4 - Sep 18th, 2007 at 4:12pm
Print Post Print Post  
I wish it was as straightforward as it seems but there are two categories where the Overtime value stored in the external database is not equal to 1.5 times the straight time value.  I'll have to make an exception test to watch for these categories, so if they are chosen and the straight time value is changed manually, the 1.5x programming does not run (probably have a msgbox pop up instead).

Sigh.

Today my boss asked my to put number buttons on my forms so he doesn't have to use the keyboard's number pad.  He wants to be able to click on a number and have it magically appear in an element, so that if he wants to retrieve customer 132's invoices he doesn't have to type 132 on the retrieve spec, but can instead click button 1, then button 3, then button 2.  I asked if it was just the code element he wanted to fill and he said no, any element.  I almost laughed at him, but I held it back. 

You see what I put up with?
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Differentiate programmed change from manual?
Reply #5 - Sep 18th, 2007 at 5:12pm
Print Post Print Post  
Infinity wrote on Sep 18th, 2007 at 4:12pm:
I wish it was as straightforward as it seems but there are two categories where the Overtime value stored in the external database is not equal to 1.5 times the straight time value.  I'll have to make an exception test to watch for these categories, so if they are chosen and the straight time value is changed manually, the 1.5x programming does not run (probably have a msgbox pop up instead).


Again, you can do this with a flag variable, but the best way is to write your calculation code in such a way that it doesn't have to care. Much less trouble over the long term.


Quote:
Today my boss asked my to put number buttons on my forms so he doesn't have to use the keyboard's number pad.  He wants to be able to click on a number and have it magically appear in an element, so that if he wants to retrieve customer 132's invoices he doesn't have to type 132 on the retrieve spec, but can instead click button 1, then button 3, then button 2.  I asked if it was just the code element he wanted to fill and he said no, any element.  I almost laughed at him, but I held it back. 

You see what I put up with?


Wow. Just...wow.
  

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


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Differentiate programmed change from manual?
Reply #6 - Sep 18th, 2007 at 9:14pm
Print Post Print Post  
See if he can accept a drop down pick list  0-9, vs.  buttons.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Differentiate programmed change from manual?
Reply #7 - Sep 18th, 2007 at 9:22pm
Print Post Print Post  
No, I told him it can't be done, that sometimes he just has to use the keyboard.  Next thing he'll want is for the freaking program to read his mind.

There's a quote from Arthur that comes to mind, said by Hobson (John Gielgud) when Arthur (Dudley Moore) announces he's going to take a bath.  I can't repeat it here, in mixed company, unfortunately.
  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Differentiate programmed change from manual?
Reply #8 - Sep 18th, 2007 at 11:36pm
Print Post Print Post  
From Hobson:
Quote:
"I'll alert the media."
...
...
Perhaps you would like me to wash your **** for you... you little ****.


  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Differentiate programmed change from manual?
Reply #9 - Sep 19th, 2007 at 12:59am
Print Post Print Post  
Infinity wrote on Sep 18th, 2007 at 4:12pm:
Today my boss asked my to put number buttons on my forms so he doesn't have to use the keyboard's number pad.  He wants to be able to click on a number and have it magically appear in an element, so that if he wants to retrieve customer 132's invoices he doesn't have to type 132 on the retrieve spec, but can instead click button 1, then button 3, then button 2.  I asked if it was just the code element he wanted to fill and he said no, any element.  I almost laughed at him, but I held it back.

I have to say, I got a good chuckle out of your last sentence here.

Now, I'm going to make your boss's day! There is a complicated solution and a simple solution. The complicated one involves some fancy tricks in Sesame, which I've toyed with already in the past.

But, why do all that when Windows has it built-in? Windows XP and Vista have something called "On-Screen Keyboard". You can find it in XP at: Start/All Programs/Accessories/Accessibility/On-Screen Keyboard

It shows a complete keyboard layout on the screen that you click on with the mouse, and the keystokes go right into the LE that has focus. You could probably even have it pop up automatically when he opens a form. What's good for you boss, is he can use this with any program in Windows.
  


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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Differentiate programmed change from manual?
Reply #10 - Sep 19th, 2007 at 10:17am
Print Post Print Post  
Quote:
Now, I'm going to make your boss's day! There is a complicated solution and a simple solution. The complicated one involves some fancy tricks in Sesame, which I've toyed with already in the past.

But, why do all that when Windows has it built-in? Windows XP and Vista have something called "On-Screen Keyboard". You can find it in XP at: Start/All Programs/Accessories/Accessibility/On-Screen Keyboard

It shows a complete keyboard layout on the screen that you click on with the mouse, and the keystokes go right into the LE that has focus. You could probably even have it pop up automatically when he opens a form. What's good for you boss, is he can use this with any program in Windows.

Well spank my fanny and call me Judy!  I had no idea this existed.  Now I just have to remember what the Sesame command is to start up an external application, tie it to his user name, and when he's suitably impressed ask for a raise.  Thanks Carl, I owe you one!
  

**
Captain Infinity
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: Differentiate programmed change from manual?
Reply #11 - Sep 19th, 2007 at 1:12pm
Print Post Print Post  
Infinity wrote on Sep 19th, 2007 at 10:17am:
Now I just have to remember what the Sesame command is to start up an external application


There is several.

@Shell()
CreateAProcess()
@AsynchShell()

-Ray
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Differentiate programmed change from manual?
Reply #12 - Sep 19th, 2007 at 2:13pm
Print Post Print Post  
@Asynchshell() works nicely and the boss was suitably impressed.  He asked me if the pop-up keyboard came with Sesame and I said, quote, "No, it comes with Windows as part of the accessibility programs for handicapped users.  Like you."

And we all had a nice laugh.
  

**
Captain Infinity
Back to top
IP Logged