batixan Posted March 15, 2012 Posted March 15, 2012 Hello, I have a database in which i have entered more than 100 records. After a while I realized that i need an extra field. Is there any way to enter the same entry (for example 1) in all 100 records? I don't want to make it Global field because the value of the field will be 1 or -1. So the Global field option doesn't solve my problem. Thank in advance.
LaRetta Posted March 15, 2012 Posted March 15, 2012 Hi Batixan, Back up first. You can use Replace Field Contents[] or even a loop through your records (must be scripted). Replace Field Contents[] would be simple, assuming you are not served ... place your cursor in the new field in any record (be sure all records are in your found set) and type a 1. Then select Records > Replace Field Contents and it should be already selected 'replace with 1'. Just click the Replace button. If some records should get a 1 and some get a -1 then you will need to use the calculation portion of Replace Field Contents. Open the calculation dialog and enter a Case() calculation depending upon the criteria you specify. For instance, if another field called TYPE is empty, you want a -1 but if TYPE has a value enter a 1 (this is illogical example so you must use your own criteria). In this instance, the calculation would be something like: Case ( IsEmpty ( TYPE ) ; -1 ; 1 ) ... which says is type is empty, enter -1, else enter 1. Then for future, you can set that field with an auto-enter with the same logic so it will do it automatically for new records, if you wish. If this does not meet your need please explain more. :^) The other way is to make the field a calculation with the value you wish. Do NOT make it unstored. Exit field definitions then go back in and change it back to a regular number field. The value will have changed for all records automatically.
batixan Posted March 15, 2012 Author Posted March 15, 2012 Hi Batixan, Back up first. You can use Replace Field Contents[] or even a loop through your records (must be scripted). Replace Field Contents[] would be simple, assuming you are not served ... place your cursor in the new field in any record (be sure all records are in your found set) and type a 1. Then select Records > Replace Field Contents and it should be already selected 'replace with 1'. Just click the Replace button. If some records should get a 1 and some get a -1 then you will need to use the calculation portion of Replace Field Contents. Open the calculation dialog and enter a Case() calculation depending upon the criteria you specify. For instance, if another field called TYPE is empty, you want a -1 but if TYPE has a value enter a 1 (this is illogical example so you must use your own criteria). In this instance, the calculation would be something like: Case ( IsEmpty ( TYPE ) ; -1 ; 1 ) ... which says is type is empty, enter -1, else enter 1. Then for future, you can set that field with an auto-enter with the same logic so it will do it automatically for new records, if you wish. If this does not meet your need please explain more. :^) The other way is to make the field a calculation with the value you wish. Do NOT make it unstored. Exit field definitions then go back in and change it back to a regular number field. The value will have changed for all records automatically. Thanks LaRetta. It worked.
bcooney Posted March 15, 2012 Posted March 15, 2012 Why would you want the same value in all records? What are you doing?
LaRetta Posted March 15, 2012 Posted March 15, 2012 Hi Barbara, Many times we use auto-enter data or pre-fill with a single value. It isn't an unusual request. And it might be two possible values (1 or -1)? I am curious what yellow flag went off to make you ask the question - I'm not disagreeing, just asking for your thinking on it. :^) Aha! http://fmforums.com/forum/topic/82973-absolute-number/page__fromsearch__1 Now I see why you ask. I hadn't read that one yet.
batixan Posted March 15, 2012 Author Posted March 15, 2012 Why would you want the same value in all records? What are you doing? Hi Barbara, Many times we use auto-enter data or pre-fill with a single value. It isn't an unusual request. And it might be two possible values (1 or -1)? I am curious what yellow flag went off to make you ask the question - I'm not disagreeing, just asking for your thinking on it. :^) Aha! http://fmforums.com/...__fromsearch__1 Now I see why you ask. I hadn't read that one yet. Well, as i solved the one problem i faced another one. And the other one is described in the other topic. Thanks a lot for your help.
bcooney Posted March 15, 2012 Posted March 15, 2012 LaRetta - The "yellow flag" is that Batixan is asking for techniques (in the other post as well) that hint at a need to step back and reconsider his data model. Batixan, I don't mean to be a pita, but your questions suggest to me that you need help with your basic table/relationship structure, what we refer to as the "data model."
batixan Posted March 15, 2012 Author Posted March 15, 2012 LaRetta - The "yellow flag" is that Batixan is asking for techniques (in the other post as well) that hint at a need to step back and reconsider his data model. Batixan, I don't mean to be a pita, but your questions suggest to me that you need help with your basic table/relationship structure, what we refer to as the "data model." Bcooney, you are right. The problem is with the data model because i try to adapt a ready to use solution in my needs. The solution is FM Starting Point. So i try to find in every step of the solution a new way in order to meet my needs.
bcooney Posted March 15, 2012 Posted March 15, 2012 FM Starting Point is quality stuff and not a bad place to start. If you care to describe your requirements, we'll suggest a data model. Invoicing systems are quite complex, in many cases, and perhaps you're better served contacting a local FM developer, if just for an afternoon session.
batixan Posted March 16, 2012 Author Posted March 16, 2012 FM Starting Point is quality stuff and not a bad place to start. If you care to describe your requirements, we'll suggest a data model. Invoicing systems are quite complex, in many cases, and perhaps you're better served contacting a local FM developer, if just for an afternoon session. I have a small laboratory. The laboratory have many products and many vendors. The thing I want is to have a solution with which I could be able to trace my products, to have an inventory and to know to who how much i own. I know that the FM Starting point solution is more for vendors and not for laboratories. But with some changes i have made on the solution i make it works for the 75% of my needs. I hope i learn more things while experiencing with the FM starting solution so that i create my own database for my lab. Thanks.
Recommended Posts
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