Jump to content
Server Maintenance This Week. ×

Menu item to add new record


Art

This topic is 5902 days old. Please don't post here. Open a new topic instead.

Recommended Posts

There has to be a simple answer to this question, though I've looked and looked. Basically, I don't want the option to add a new record through the menu item. I only want to add a new record via a script because of the nature of what needs to be entered into that new record. It appears that my only option is to use a plugin called secureFM but that's really overkill for me and I can't justify the $155 cost to disable one menu item. I'm not distributing any solutions to anyone. This is only for my use and those who access my machine to use the file. Is there any way to do this without shelling out big bucks? If it were a $10-20 investment I could handle that, but no way can I spend $155.

Link to comment
Share on other sites

I don't have advanced. I have 8.5 pro - That's what I checked in the FM client and why it came up advanced, I'll never know. I do know that in previous posts I always chose Leopard as my OS and it would come up as Tiger. At any rate... I don't have Advanced. I have FM Pro 8.5, which doesn't give me that option.

Link to comment
Share on other sites

Do you want to turn off new record creation for yourself as well as other users?

You can limit menu items in Accounts & Privileges by creating a Privilege Set with the Available Menu Commands set to Editing Only. That will limit your menu choices a lot though.

You can also create an Account that doesn't allow new record creation and have other users use that account. Or have everyone use that account and add a script that will require a password to create a record.

Depends on how other users are accessing your database.

Link to comment
Share on other sites

Yes, I want to limit myself to not use the command/N menu item because I often forget and do it sometimes automatically and create records that I have to go back to later and edit information that should have been put in when the record was created. That's why I want to use only a script to create the record.

I played around with the accounts and privileges part and I can't seem to make it do what I want it to do. You are right in that it limits the choices a lot.

I guess I just need to make a huge ugly button that can't be missed and glares at me to use the button and not the keyboard to create a record.

Link to comment
Share on other sites

You could make an auto-enter field that says, "Hey, you forgot to click the button!" Set your button's script to clear the message, so you'll only see it when you forget to click the button.

Or you could ask someone who does have Advanced to create the custom menus for you. You don't need Advanced to *use* custom menus, only to create them.

Link to comment
Share on other sites

Hmmm.... you may have an answer. Short of simply disabling the menu item, this might work. The field (that I'm most concerned about) is actually a hidden field on all the layouts except one but it's absolutely essential that it get filled out because it's used in finding and sorting records. So... since it's actually hidden, depending on the layout I'm in, then I wouldn't see the field if I create the record while in one of those other layouts.

Now, ...if it were possible to trigger a script when a record is created, that could solve the problem as well, since my current script does all the work and the first order of business in the script is to make a new record and then fill it in. So, I guess what I need to do is figure out how to trigger a script when doing command/N for a new record.

Link to comment
Share on other sites

Again, you could have someone with FileMaker Advanced make a custom menu set for you that runs your specified "New Record" script when you press cmd-N. Once that's done, you may continue to modify the script all you want.

You could also use a plugin like zippScript for this, by putting the trigger in an auto-enter calc.

I have to ask, why can't you just use FileMaker's normal auto-entry options to fill in the fields, if that's all there is to this?

Link to comment
Share on other sites

Again, you could have someone with FileMaker Advanced make a custom menu set for you that runs your specified "New Record" script when you press cmd-N. Once that's done, you may continue to modify the script all you want.

You could also use a plugin like zippScript for this, by putting the trigger in an auto-enter calc.

I have to ask, why can't you just use FileMaker's normal auto-entry options to fill in the fields, if that's all there is to this?

I could ask someone with Filemaker Advanced but there's a little hitch to that.... I don't know anyone with FM Advanced.

I haven't heard of zippScript. I'll have to check that out.

As far as auto-entry options, the entry is not the same. It really changes depending on the layout that is being used as to what goes in the field.

My project that I've created is a Password program. I know, I know, there are dozens of password programs and I've probably have tried them all. I've even paid for a couple and then gotten disillusioned by them. There's nothing quite like a custom built program that meets MY needs rather than the needs of the masses. I struggled with those programs for a long time and then thought, "Why not just build my own with FM?" So, I did. And I've got it pretty much exactly like I want it to be. I have about 8 different main categories with a separate layout for each category. My new record script will recognize what layout I'm in and fill in the category field (that's hidden) with the proper category name. So, when I sort or do a find that information is essential. If I don't use the script to create the record, then I'll miss filling in that category field because it's not showing for that particular layout. Then when I come back to the record later, it doesn't show up in the layout it should and I forget that I even entered the record until I do a sort in the master layout that shows everything and see a half dozen or more records with empty category fields.

That pretty much explains what I'm doing and I must say that it's pretty cool to be able to make this exactly like I want it to be and still have it as secure as the programs you buy for that purpose. It's just these little quirks that I'm trying to smooth.

Link to comment
Share on other sites

Go to Accounts & Privileges. Select Privilege Sets. Create a new Privileges Set using all the options your current Privilege Set has, except, under the Records menu, choose Custom Privileges... For the tables in question, change Create to No.

Voila, no one can create new records. Except, you may want to (just not by accident). So write a script that has the New Record script step in it and set it to run with Full Access Privileges and attach it to a button on your layout.

Link to comment
Share on other sites

Perfect! See... I knew there was a simple answer. From my preliminary testing this is working just like I wanted it to work. I had to set each of my scripts to run with full access but that's fine... no problem there.

Thank you. The whole accounts/privileges thing is a little confusing but you helped me see it in a new light and make some sense of it. I'm appreciative.

Art

Link to comment
Share on other sites

Art, with the Get ( LayoutName ) function you can auto-enter the layout name and/or combine it with a Case calculation to get exactly what you want.

Link to comment
Share on other sites

Tom,

Hey hey! This works also and would mean I wouldn't have to worry about privilege sets and signing in as another user or trying to remember an Admin password if I wanted to change something in the file.

Simple and elegant! Thanks.

Art

Link to comment
Share on other sites

This topic is 5902 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.