June 10, 20169 yr Newbies Hello all. I have been using FM Pro for many years now, by creating simple databases for keeping my customers info, invoicing and general office stuff. I'm currently using FM Pro 14 Advanced. I 'm at a dead end now, trying to edit an existing database. What I'm trying to do is: I have a list of serial numbers of products I have received in past days. These numbers are stored in an existing value list called "Tested". I also have a field called "Unit Serial", where I punch the serial number of the incoming product. What I need is, if the entry of this field exists in the value list, to get a warning message saying that this product has been tested before. If the entry does not exist in the value list, I want to proceed with what I have to do with no warnings. Thank you in advance for any help provided. Loris
June 10, 20169 yr It's not clear what you mean by "to proceed with what I have to do". If the process is scripted, you can interrupt it by showing a custom dialog if: not IsEmpty ( FilterValues ( YourTable::Unit Serial ; ValueListItems ( Get ( FileName ); "Tested" ) ) ) Alternatively, you could validate the field by the negation of the above expression. -- P.S. I am not sure a value list is the best place to store data.
June 10, 20169 yr Author Newbies Hello and thank you for your reply and the info provided. "to proceed with what I have to do" is not related to the Database, sorry for the confusion. I meant reply to my customer accordingly. I can script the process, following your suggestion. What would you recommend for data storage? Thank you once again. Loris
June 10, 20169 yr 1 minute ago, LorisGreycom said: What would you recommend for data storage? Tables, records and fields. I am not sure what your exact workflow is, but suppose you have a global field where you enter the serial number of a product, you could use a relationship to a table of Tests to show you any existing records in that table having the same product serial number.
June 10, 20169 yr Author Newbies You supposed correctly. It's a rather small database, of give-or-take 12,000 records of small amounts of data (fields). The serial numbers of the products in the value list so far are no more than 50. You are right, a Table is the way to go, I should have thought of it since I have done so on a different, larger file. I will give it a go and let you know how it went. Thank you once again for your replies. Loris
June 16, 20169 yr Author Newbies Hi again. I'm sorry to say that it did not work. Not saying that you 've made a mistake, but there's must be something I'm missing. No matter what I do, even if the input in "Unit Serial" matches "Tested" or if they are different, I get the same error message. Ah, the bad luck of the amateur. Thank you anyway. Loris
June 16, 20169 yr 2 hours ago, LorisGreycom said: No matter what I do, But we don't know what you do... Have a look at the attached file - it shows 3 methods of checking if the entered unit has been tested before. test.fp7
June 17, 20169 yr Author Newbies Wow, thank you, this is extremely nice of you. I will go over the file and see what I did wrong. I'm sure it's a small detail, which obviously counts! I really appreciate your time, a million thanx! Loris
Create an account or sign in to comment