christw Posted June 1, 2008 Share Posted June 1, 2008 Hi, I want to set up a value list to choose a supplier from a table of suppliers but only save the supplier code in a related table. That's easy to do. The problem is that the field with the dropdown list then reverts to the supplier code so it doens't give much meaning to whoever looks at the setup. I put a realted field to show the actual supplier name but I would prefer, if possible, to hide completely the supplier code and only allow the supplier name visible. Also, my database involves using catalog items. The problem is that I might want to add a catalog item. I would just input the item code and if it is not yet entered it would ask me to create a new record in the item table. Is there some way to do this? It would be easy if I could perform a script but what would the trigger of the script be? Thanks Quote Link to comment Share on other sites More sharing options...
Techphan Posted June 1, 2008 Share Posted June 1, 2008 If you join FM Cafe you will be able to take advantage of being able to look at posted applications and screen shots (it has been very valuable to me). It would be helpful if we could see a screen shot of the payout you are asking about. To hide the suppier code you can make the field background color AND text color the same color as the background of your layout. I do not use (yet, anyway) 3rd party add-ons so I must trigger my scripts with a button. Quote Link to comment Share on other sites More sharing options...
Molson Posted June 2, 2008 Share Posted June 2, 2008 Hi, I want to set up a value list to choose a supplier from a table of suppliers but only save the supplier code in a related table. That's easy to do. The problem is that the field with the dropdown list then reverts to the supplier code so it doens't give much meaning to whoever looks at the setup. I put a realted field to show the actual supplier name but I would prefer, if possible, to hide completely the supplier code and only allow the supplier name visible. A standard technique for doing this is to place two fields on top of each other. The topmost is the related field for supplier name and has a white background so the underlying field is not visible. Set the Field Behavior to allow entry only in Find mode. The underlying field is the linking id field. Attach the value list to it, which can -- if you choose -- display only the supplier name, but it will enter the supplier id field. Set the Field Behavior to allow entry only in Browse mode. Results, user selects a supplier which places the ID in the ID link field, the supplier name field displays on top, the ID is hidden. Also, my database involves using catalog items. The problem is that I might want to add a catalog item. I would just input the item code and if it is not yet entered it would ask me to create a new record in the item table. Is there some way to do this? It would be easy if I could perform a script but what would the trigger of the script be? A technique I have used for this involves a script for new record. An example of use is when adding a name to a contact table, the user should not add a name that exists. In general terms, the script begins with a Custom message asking the user to input the name, in your case the item code. I use a global input field. Once the data is entered, I usually test for the count of records matching, using a relationship which matches the global field to the field holding the data being checked for: again, in your case, the item code. If the count is ≥ 1, the item -- or one like it -- exists, so the script displays the matching records with a message to the user about the matches. If the count is 0, the record does not exist, so a new record is created. For a nice touch for the user, enter the item code for them from the global field. Also remember to start the script by setting the global field to blank. HTH, Michele Quote Link to comment Share on other sites More sharing options...
christw Posted June 3, 2008 Author Share Posted June 3, 2008 Thanks Michele, The idea of the fields over each other works ok but looks a bit unclean if one makes a mistake and goes to change the chosen value. Otherwise it works perfectly. As for the second issue, I don't think you grasped what I meant - probably I didn't explain myself well - in fact I am already using the method you illustrated to create a new user account in the program and it works ok. I think I can solve my problem using a plugin I found mentioned in another thread - Eventscript from - It seems that it is exactly what I need. Will try it out and let you know the outcome. Quote Link to comment Share on other sites More sharing options...
christw Posted June 3, 2008 Author Share Posted June 3, 2008 I meant Eventscript from http://www.softs4humans.com/FMPro_Plugins.html. It seems that the link I posted didn't work so I'm pasting it as text. Chris Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.