abomb Posted October 3, 2006 Posted October 3, 2006 Hey everyone, Need some help and couldn't find anything that really dealt with my topic. If there is one, let me know. Pretty easy setup; Receipt and Inventory Tables. Inventory records created through portal on Receipt table. Have a 2 dozen or so categories a user can choose from. I've created an Eventscript so when a category is chosen, a window opens showing appropriate data to appropriate record. Works great. What I can't seem to develop is a way to warn users about changing a category. Users will at some point make a mistake and I want a way to warn them that if they change the category, all information will be erased(which it will although not in script). Right now, even if I don't change the category it will bring up the custom dialog? Script is first attempt to do anything like this so be gentle if it's way off. Thanks in advance. Material_Tracking.pdf
John Mark Osborne Posted October 4, 2006 Posted October 4, 2006 I've read your post twice yesterday and again today because it was still unanswered. You've posted your script but it's still difficult to understand what you want. It's obvious you want a warning to appear but posting a script without any information on how the category field fits into the script makes it very difficult to help you. If you want assistance, you need to spend time constructing your question so we can visualize your problem. Maybe you should consider posting your files with step-by-step instructions on how to identify the problem.
abomb Posted October 4, 2006 Author Posted October 4, 2006 Thanks John. Sometimes you work on something for awhile and know exactly how you want it but forgot that others are seeing it for the first time. I don't have a program to ZIP files(I'm working on getting a program soon but always seems like something else to do), so I appologize for the PDF's. I highlighted what I feel are the appropriate items. Again this is an inventory tracking system. I'm trying to make the entry process as easy as possible because the person who would be responsible is brand new to FM and is not even very familiar with computers in general. I want him to realize that if he is changing the inventory type, he is going to have to reenter all information. Like I said, I know at some point a mistake will be made, and I feel that deleting all information in the fields is the best way to ensure data isn't missed(also so that he pays attention the first time unless he wants to redo it all). All our inventory needs to be traceable and is very important. As it works right now, if I go to Type field and select the same item from the list, when I tab out it shows the warning. I only want it to Show when the Type is changed, and then continue depending on response. Hope this helps and is informative enough. Thanks again Screen.pdf
John Mark Osborne Posted October 4, 2006 Posted October 4, 2006 I think I understand now. The only problem is, checking to see if the value is being entered for the first time or the same value is being entered versus a different value being entered. Anytime the field is modified, the auto-enter is going to occur, triggering your script. Thus, you need something in your script to determine if the warning should be shown. Checking to see if the value equals itself probably won't work as you have already attempted. I'm not exactly sure what to offer you as a solution. I think you need an entirely different approach. Maybe someone else will see the post and have a great idea.
abomb Posted October 5, 2006 Author Posted October 5, 2006 Thanks John. I went out and got a copy of Winzip and I'll post my file as soon as I get it working. And I'll try some other ways to to work out the problem.
abomb Posted October 5, 2006 Author Posted October 5, 2006 Here's the file. Hope someone has a suggestion. Thanks again. Hope the ZIP works Evaluate_Field.zip
abomb Posted October 5, 2006 Author Posted October 5, 2006 Sorry. Let me try that again. Evaluate_Field.zip
John Mark Osborne Posted October 5, 2006 Posted October 5, 2006 The big problem is that I don't have the plug-in you are using.
Homer Posted October 6, 2006 Posted October 6, 2006 (edited) Hello Mr. Osborne. I'm really proud to give you these links about our popular plug-in and by the way, thank you very much for all your works! EventScript is free of charge and can be downloaded at: http://www.softs4humans.com/FMPro_Plugins.html There is some additional demo files at the botton of this page and the FAQ/tutorial page is available at: http://www.softs4humans.com/support/eventscript_faq.htm About the question by abomb, here's the solution I'm suggesting: First, I think this is a 2 step processus. You have to grab the previous value (product's type) for the clicked product and then, in a second step, see if the value was changed or not by the user. So I simply placed a button over the type field inside your portal to execute the first step. I.E. The previous value is saved in a global variable as soon a user is entering the type field. I changed a bit your trigger calculation inside the auto-enter option for the type field (from the Inventory table). The modifications are explained in the FileMaker file I attach with this post. And finally, I also changed a bit your triggered script because your If statement wasn't working. It seems to work fine now!! About the 1st step, I simply want to say that it is also possible to place a built-in before-update trigger inside the field itself. This solution is a bit more complex (using privilege set) and I'm not sure it is necessary here. But the big advantage would be to have a script on-entering-the-field. I think this is clever than the button placed on the field on the layout. But it depends on your needs. Along with the current on-exiting-the-field action, you and your users would have the complete setup to 'encapsulate' your type field. And these scripts (before and after update) would occur whatever the layout on which you will place the type field. GF-Material_Tracking.zip Edited October 6, 2006 by Guest
abomb Posted October 9, 2006 Author Posted October 9, 2006 Thanks for the reply Homer. You got it perfect. I almost had it working myself. I set up some simple set and calc fields to test which path to take. I like the use of the global though instead of the path I chose. There's still so much I don't understand about this program. I'm going to work on it some more and I'll post my solution(if I can get it to work right) or more questions. There are a few other things I think I need to add to get it exactly how I want. Thanks again.
abomb Posted October 9, 2006 Author Posted October 9, 2006 If anyone is still interested, Here is how I got it to work. I don't know if this is the most efficient way to do this but it gets me what I want and I think it is easy enough for others to understand. I would love some comments or feedback as this is my first really complicated script designed with other people in mind. Material_Tracking2.zip
Recommended Posts
This topic is 6622 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 accountSign in
Already have an account? Sign in here.
Sign In Now