Normal Topic Question on @Select Tree Item in programming (Read 937 times)
esgage
Junior Member
**
Offline


No personal text

Posts: 55
Joined: Dec 8th, 2005
Question on @Select Tree Item in programming
Feb 23rd, 2006 at 3:11pm
Print Post Print Post  
To Whom It May Concern:

I am trying to make a command button start in one form, go to another form and print the selected results, and then automatically return to the original form after printing. I am having trouble with this. Please look over the program below. Everything works in this program, except after the printing is complete, it stops running after the last @exit. Do I have a procedure that is incorrect? Any input would be greatly appreciated.

var VKey as Int
Var VMenu3 as Int
Var VSuccess as Int
Var VMenu4 as Int
   
    vKey = NC?
    @Save
    @exit
    vMenu3 = @SelectTreeItem("ESGAGE!Forms!Search/Update!Orders!Non-Conformance Report")
    VSuccess = @SelectTreeItem("Search Update Menu!Search (F7)")
    FormFieldValue("Non-Conformance Report", "NC?", 0, VKey)
    VSuccess = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")
    VSuccess = @SelectTreeItem("Search Update Menu!Results Commands!Printing Commands!Print Forms")
    @Exit
    vMenu4 = @SelectTreeItem("ESGAGE!Forms!Search/Update!Orders!Non-Conformances")
    FormFieldValue("Non-Conformances", "NC?", 0, VKey)
    VSuccess = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")


Note:I am using Sesame 1.1.3 Origin form in above program is Non-Conformances.

Thank you,

Kevin
E & S Gage
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Question on @Select Tree Item in programming
Reply #1 - Feb 27th, 2006 at 6:14pm
Print Post Print Post  
Hello Kevin,

No code should follow an @Exit.

Your command buttons code will be something like
Code
Select All
Var vSuccess as Int
Var vMenu as Int

	SetDefaultTab("Search/Update Non-Conformances")
	GlobalValue("KeyValue", @str(NC?))
	@Save
	vSuccess = @SelectTreeItem("Search Update Menu!Search (F7)")
	vMenu = @SelectTreeItem("ESGAGE!Forms!Search/Update!Orders!Non-Conformance Report") 



Your Non-Conformance Report on Retrieve Spec open programming is going to be something like
Code
Select All
Var vSuccess as Int
Var vMenu as Int
Var vKey as Int


If @GlobalValue("KeyValue") <> "" Then
{
	vKey = @ToNumber(@GlobalValue("KeyValue"))
	GlobalValue("KeyValue", "")
	NC? = vKey
	vSuccess = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")
	vSuccess = @SelectTreeItem("Search Update Menu!Results Commands!Printing Commands!Print Forms")
	vSuccess = @SelectTreeItem("Search Update Menu!Search (F7)")
	vMenu = @SelectTreeItem("ESGAGE!Forms!Search/Update!Orders!Non-Conformances")
	FormFieldValue("Non-Conformances:(Search)", "NC?", 0, vKey)
	VSuccess = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")
	@Exit
} 



In some other event you are going to need to clear the default tab or set it back to your custom menu if you are using one. The code above assumes that you are in Update mode on the "Non-Conformances" form and that the form "Non-Conformance Report" is not open.

For future reference do not name elements, forms, or databases with a - in the name. A list of characters that should not appear in names are on page 7 of the Q&A Database Translation Guide.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
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: Question on @Select Tree Item in programming
Reply #2 - Feb 27th, 2006 at 8:44pm
Print Post Print Post  
Quote:
For future reference do not name elements, forms, or databases with a - in the name. A list of characters that should not appear in names are on page 7 of the Q&A Database Translation Guide.
Interesting location Ray.

Suggest copying that list somewhere else, perhaps the Programming Guide? 

There are many users who will be creating Sesame databases from scratch, and will have no need to look at the Translation Guide. 

Have not looked for this purpose, but perhaps there are other pieces of info that also should be documented in the "normal" documentation?
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Question on @Select Tree Item in programming
Reply #3 - Feb 27th, 2006 at 9:02pm
Print Post Print Post  
Hello Bob,

It may be documented elsewhere, I just know about page 7 of the Translation Guide off the top of my head.

-Edit-
Page 8 of the 1.1 Programming Guide also has the list.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Question on @Select Tree Item in programming
Reply #4 - Feb 27th, 2006 at 9:30pm
Print Post Print Post  
Quote:
There are many users who will be creating Sesame databases from scratch, and will have no need to look at the Translation Guide.


Bob,

Sesame will not allow you to create illegal element names in SDesigner. This is only really an issue on names coming in from Q&A Translation.
  

- 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: Question on @Select Tree Item in programming
Reply #5 - Feb 27th, 2006 at 10:30pm
Print Post Print Post  
Ahhhh, Sesame is so smart, huh? Grin
  



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


No personal text

Posts: 55
Joined: Dec 8th, 2005
Re: Question on @Select Tree Item in programming
Reply #6 - Feb 28th, 2006 at 12:22pm
Print Post Print Post  
Ray:

I will try this. I have not been in the computer in a few days and I noticed your post. I will see if I can succeed with this. Thank you so much!

Kevin
  
Back to top
 
IP Logged