Jump to content

Fields that can be changed or entered only once


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

Recommended Posts

I need some real help...In more than one way... smile.gif

Here is the situation: I have a pull down field that automatically fills out address, phone, contact etc... information automatically. Well we also use this field to do searches for that company name...I need to make that field lock after the orginal input is done...but still have the ability to be made searchable...This way the other people in the company can not mess up the data base by forgetting to hit find before they use the pull down menu...When they do this they change the company for that contact... not good. Is there any way to make a field with a pull down menu have information that can not change after the orginal input is done??

FileMaker Version: 6

Platform: Windows 2000

Link to comment
Share on other sites

is there another way you know of...I have two people that need to enter information and one of them I think keeps changing the information by mistake...if there is not another way can there be a pop up that say you are about to change the information in this record...only whey are not in the search mode?

Thanks

Link to comment
Share on other sites

If you were using FM7, you could turn off filemaker's auto-save function, so that the user would be presented with a "save changes" dialog when exiting the record. This is not an option in 6.

You could use scripting to control all data entry and editing. Have the users enter all data into global fields and force them to hit a "submit" button that would either create a new record with the values in the globals, or modify another specified record depending on the situation.

Another option is to actually have separate data entry and search layouts and train users (or force them) to use these layouts. The best way to force them is to disable the use of menu commands for their accounts, and create scripts for the switching of modes and layouts so they can only go where you tell them to go.

Dana

Link to comment
Share on other sites

One way that comes to mind, Joseph (but there are others):)

Script attached to your popup with:

If [isEmpty(CompanyField) or Status(CurrentMode) = 2

Go To Field []

Else

Show Message [buttons: OK, Message "Leave it be! You can't change it"]

End If

The other option that comes to mind is to use Access Privileges to restrict editing rights using the same idea.

My question is ... what if someone really NEEDS to change the information? I prefer using (as suggested) another layout for all searches - and providing globals.

Link to comment
Share on other sites

There are more drastic measures, such as Ray's Automatic Value Locking System here but I doubt that's what you're after. Joseph, you have to open it up to Users for modification at some time, because Company names DO change. smile.gif You aren't using your Company name as a Unique ID key are you?

But I understand your concern about the popup. They can be unforgiving by replacing the entire field contents in a whack! You might also want to check out some of the Audit Tracking systems, also on Ray's site. I'm currently using the one for 7 and it's incredible - only requiring two additional fields.

One other idea ... allow them to edit the Company name only as a standard field and not use the popup for it. If you would like Users to be able to edit the company name as a standard field, but only use the popup while in Find Mode, you can do that also by stacking a regular field and a popup.

Attach the following script to your popup:

If [status(CurrentMode) = 2]

Go To Next Field

End If

Place this same field (another copy) on top of your popup but format as standard field. Change your Tab order so that the standard field is one number greater than your popup. In this way, Users can edit the field (one letter at a time) but only have access to the popup while in Find Mode.

Link to comment
Share on other sites

wow you guy thanks for all the help...I have a question regarding if [status(currentmode)= 2] script...where do I add this too; the find script or the pulldown script...I just have a lookup for the pulldown script how do I add it if thats were I add it too. Second, when I add it does it allow me to us the pull down menu when adding a new company, because that would be very useful.

Recap:

I need the pull down menue to work in add new company mode and find mode but not in normal do nothing mode smile.gif...and where do I add this script?

Link to comment
Share on other sites

If you want Users to be able to use that popup to add a Customer but NEVER change it again; and, if you want them to be able to use it in Find Mode, I suggest you try the first script I suggested as a separate script attached directly to your popup field.

The 'not IsEmpty' will ensure that the popup won't work if data already exists in the field (meaning the record has already been created and someone is trying to change it.) The Status(CurrentMode) = 2 signifies Find Mode. This means that if a User is NOT in Find Mode and already has information in the field, the popup is unaccessible. In Find Mode, the popup will work regardless of the data in the field.

I can not suggest how you should specifically incorporate the script into your existing solution because I am unclear on what current script-steps are being used. Keep in mind that this script will stop Users from EVER changing the Company name from this layout once it's been created but will not stop its use in Find mode.

I assume you have a New Record script? It isn't attached directly to the popup field is it? And I also assume your Find script isn't directly attached to the field either? You can attach this script (as a separate) script directly to the popup field and it shouldn't interfer with your New Record or Find scripts. Again, it depends upon what you have or want. I suggest you play with it and see what works best for you. The second script I suggested, assumes you want to be able to edit the Customer name. smile.gif

Link to comment
Share on other sites

ok...I am getting it...Both scripts; the find and the new record script are separate. But my pulldown is not a script that I know of..It was just selected under value list and then I picked where to get the information from (a seperate data base named broker company...How do I attach a script to that? Thank you for talking the time to help with this.

Link to comment
Share on other sites

Right-click on your field in layout mode and select Specify Button, select Perform Script, and specify the script to be used. You'll want to also format the field to not allow entry or remove it from the tab list.

Link to comment
Share on other sites

ok...Thanks... I have done all of what you said...When I attach the script to the Broker's Company Field (the Pulldown Field). it comes up with the message and when I am in find mode the message does not appear...Great....But when I am in find mode or input mode the pulldown list is not showing up the script is stoping me I think how do I fix this...Is there a way to write a script that does a pull down menu or something....

Link to comment
Share on other sites

I am unclear on which process and script you implemented. And I am unclear on what additional scripts you are using. So it is difficult to pin down what your problem may be.

"But when I am in find mode or input mode the pulldown list is not showing." This contradicts your previous statement that it works in Find but not in Browse, which is what you wanted?? crazy.gif

Please clarify: 1) Which of my two suggestions did you go with? 2) What is your Find script, 3) what is your New Record Script and 4) exactly what is it that you still need to accomplish? What do you mean by input mode and wanting a pulldown? New record should allow entry into popup because the field is empty and you said you didn't want the popup used after that while in browse. Please explain.

We'll work through it for you but it will be helpful if you give more detail when you respond. The pulldown list is not showing? It disappears? Say more, okay? wink.gif

Link to comment
Share on other sites

  • 2 weeks later...

This topic is 7288 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.