Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Mass update on Custom Menu (Read 1833 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Mass update on Custom Menu
Jul 27th, 2005 at 5:38pm
Print Post Print Post  
I have a custom menu that is displayed in Add Data mode. It seems that I cannot run SBasic programming in a Mass Update becuase there are no 'records' to update on. The Mass Update just 'quits' before starting.

Is there a better way to run simple SBASIC programming from a Custom Menu without having to use command buttons?

Should I add 1 record to the database so I can run mass updates? Should I be using Search/update mode to display my custom menu?

Thanks,
Steve
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Mass update on Custom Menu
Reply #1 - Jul 27th, 2005 at 9:44pm
Print Post Print Post  
Steve,

Are you actually trying to Mass Update the custom menu, or are you wanting to update another form (DB)?

Quote:
Should I add 1 record to the database so I can run mass updates? Should I be using Search/update mode to display my custom menu?

If your custom menu only has command buttons and maybe tab pages, which is probably the case, you won't be able to add a record to this DB anyway.

If you are going to launch a mass update from a custom menu, wouldn't you want to have a cummand button do it? If you simply want to have SBasic execute some code when the custom menu first opens, put the code in the "[FormName] :: On Form Entry" event.

If that is not what you want, leave some more details here, and I'm sure one of us on the forum will have an idea.
  


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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Mass update on Custom Menu
Reply #2 - Jul 27th, 2005 at 10:11pm
Print Post Print Post  
Thanks Carl,

I'm just wanting to run some various Xlookups on various external db's as part of 'maintenance' that is used so infrequently, that it does not warrant a button on the form.

The spec manager is a great place to 'store' these programs, but we need a way to 'run' them without having to leave the 'custom menu'. Also, I like the convenience of 'tweaking' a program from the Spec Manager, rather than having to upen up a DSR to make a minor change.

Any thoughts?
Steve


  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Mass update on Custom Menu
Reply #3 - Jul 28th, 2005 at 3:49am
Print Post Print Post  
Quote:
but we need a way to 'run' them without having to leave the 'custom menu'.

If you don't want to leave the custom menu AND you don't want a command button on that menu, I have no idea how you would tell SBasic to execute that particular code. The only thing I can think of is to use tab pages on your menu form. The tabs take up very little space, and that rarely used command button can be hidden most of the time, but available with a simple click of a tab. This is the way I have set up some of my custom menus. The first tab contains the buttons used most, and I have multiple tabs to contain the ones that are less often needed.

Quote:
Also, I like the convenience of 'tweaking' a program from the Spec Manager, rather than having to upen up a DSR to make a minor change.

I Agree.
  


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


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Mass update on Custom Menu
Reply #4 - Jul 28th, 2005 at 12:33pm
Print Post Print Post  
Steve,

You can use Visibility to only show seldom needed command buttons when they are wanted. You can also change the color and box type of the buttons to make them less obtrusive.

Another option is to put seldom used commands in a combo box with a single GO button that runs whatever command is selected in the combo box.

Or, you can have one button that pops up a list of tasks and runs the one you choose.

Etc...


BTW, by writing your code generically using arguments, so it can adjust itself for multiple situations, you can often avoid the 'tweaking'.
  

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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Mass update on Custom Menu
Reply #5 - Jul 28th, 2005 at 2:30pm
Print Post Print Post  
Thanks Carl and Erika, for the insight. I'll continue to learn up on Sbasic in hopes of writing more flexible programming so I dont have 100 buttons on my form.

When I need to write a quick program to do some Xlookups, I'll just open another DB and run it from there.
(unless I can figure out a way to add just 1 record to my Custom Form database) Smiley

Thanks again,
Steve
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Mass update on Custom Menu
Reply #6 - Jul 29th, 2005 at 2:43am
Print Post Print Post  
Quote:
(unless I can figure out a way to add just 1 record to my Custom Form database)

You could add a record to your custom menu form database if you added a text box. It could be one character wide with the background and text color the same as your layout color, so that it would not be seen. And you could set the text box to read-only after adding the one record with say, an "A",  in the text box LE. That way, no one could enter that LE and delete the value by mistake. No one but you would need to know that the text box is there.
  


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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Mass update on Custom Menu
Reply #7 - Jul 29th, 2005 at 4:36am
Print Post Print Post  
Carl, thats clever and sounds like it may give me what I want.

Here's hoping that it works in Add mode.

Thanks again,
Steve
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Mass update on Custom Menu
Reply #8 - Jul 29th, 2005 at 12:00pm
Print Post Print Post  
I forgot that you want to use Add Mode. You'll need to skip the part about making the text box read-only unless you use Update Mode. Actually, you'll probably want to use Update Mode though, because in Add Mode you would have to enter a value in the text box and save the record before you could use Mass Update. Otherwise, there would be "0" records to update.

To use your custom menu in Update Mode, you can use the following code in the "On Application Open" event.

Code
Select All
var success as Int

success = @SelectTreeItem(@Application + "!Forms!Search/Update!Menu!Menu")
success = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")

SetDefaultTab("Search/Update Menu")

AddToTranslationTable("Search/Update Menu", "Main Menu")
 


This code assumes that your custom menu is named simply "Menu". The last line just renames the form's tab to more accurately reflect what the form is.

Also, I thought of this after I posted the previous message, rather than making all of the colors of the text box the same as the layout background, it would be easier to use the Visibility function to hide it. That way, you would still see it in design mode.
  


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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Mass update on Custom Menu
Reply #9 - Jul 30th, 2005 at 12:15am
Print Post Print Post  
Thanks, again, Carl.

Looks like it will be easier than I thought. I'll give it a try in the next few weeks.

Steve
  
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Mass update on Custom Menu
Reply #10 - Dec 30th, 2005 at 1:07am
Print Post Print Post  
Since upgrading to 1.1.3, I can add blank records to my custom menu form and can now run a mass update from the custom menu

I'm not sure why this is now possible, but it seems to have it's advantages Smiley

Apparently, custom menus in Add mode now require programming to prevent saving blank records, or something.

Just thought I'd voice this info.

Steve
  
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: Mass update on Custom Menu
Reply #11 - Jan 3rd, 2006 at 7:53pm
Print Post Print Post  
Quote:
Since upgrading to 1.1.3, I can add blank records to my custom menu form and can now run a mass update from the custom menu

I'm not sure why this is now possible, but it seems to have it's advantages Smiley

Apparently, custom menus in Add mode now require programming to prevent saving blank records, or something.

Just thought I'd voice this info.

Steve


Hello Steve,

I have looked a few custom menus here and I have yet to see this behavoir that you describe. Do you have any text elements or any elements on your menu form other than command buttons? Any on Form Entry programming that is changing elements?

-Ray
  

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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Mass update on Custom Menu
Reply #12 - Jan 3rd, 2006 at 8:47pm
Print Post Print Post  
I see now that I have 1 bound LE text field. This must be what is allowing me to create a new record with F10. It's been there for a long time, but I never noticed that I could create new records until just the other day.  ???

Also, perhaps the small changes in 1.1.3 are allowing the records to advance.

For what it's worth, tt is nice to be able to run mass updates from the custom menu in add mode. I hope to be able to retain this functionality while still preventing records being added to this form.

Steve
  
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: Mass update on Custom Menu
Reply #13 - Jan 3rd, 2006 at 9:39pm
Print Post Print Post  
I don't think it has anything to do with 1.1.3.

I remember seeing your products app a while back in 1.1.2, or earlier, and I could F10 in the Main Menu. I was curious about why I could, so I investigated and found the on Form Entry event filling in a text field which I would have seen if I had scrolled down a bit.

Wanting to prevent the adding of records and still Mass Update is not going to work as far as I can see in Add Data mode. Like Carl pointed out using Search/Update with one record to do Mass Updates is how to do it. There is a problem with doing it that way. If you are in a multi-user enviroment then people are going to be seeing a locked menu form. There are a couple of ways to get around that.

1. Create a Record for each login and store each persons UserID on thier main menu record someplace and have the default retrieve spec for the Main menu get that persons record. Then as long as no two people use the same ID, no one will see a locked record.

2. Keep using Add Data mode for every user but yourself. Put an If statement in the On Application Open event that opens Add Data for everyone but you and for you opens Search/Update and hits F10

3. If you do not have security you can still do this. All you need to do is have a text file on your computer. For Example C:\Sesame\RayToldMeToDoThis.txt
Then in the On Application Open event check to see if that file exists and if it does then open Search/Update else open Add Data.

-Ray
  

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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Mass update on Custom Menu
Reply #14 - Jan 6th, 2006 at 9:53pm
Print Post Print Post  
Thank you for this info, Ray.....very clever idea (create a record for each user.)

I've made a note to come back to this idea when time allows.

Thanks for 'stretching' my mind beyond its limits. Smiley

Steve
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print