fantasmamore Posted February 5, 2012 Posted February 5, 2012 Hello! I have designed a database with a field which is a drop-down menu with only two options, lets say "optionA" and "optionB". What I want to do is, when someone is in find mode, and sees only x records out of y, to be able, by pressing a button to change all "optionA" values to "optionB". What's the code for this button? Thank you in advance!
comment Posted February 5, 2012 Posted February 5, 2012 when someone is in find mode, and sees only x records out of y, Your question is not clear. When someone is in find mode, they don't see any records.
Cliff Zhou Posted February 6, 2012 Posted February 6, 2012 Just as Commet says, you question is not clear. If you are simply want to drop-down menu which showing different values in browse mode and find mode, you can do this: Specify Value list as "Use Value From Field" and "Include only related Values start from a related table " You can change the related table's field to make you dropdown menu showing differently.
fantasmamore Posted February 6, 2012 Author Posted February 6, 2012 You are right, let me rephrase. Lets say that the database has 20 records and a client uses the find mode to find the records that match his criteria. After searching, he can only see a small amount of records, lets say 12. And then he wants to make a change to those specific 12 records that match his criteria. There is this drop-down list with values like "optionA" and "optionB" and I want by pressing a button to automatically replace everything with "optionB". So if he searches in the database for any Medium size t-shirts, and the result is 12 different designs, to be able by pressing a button to replace the colour of all the medium size t-shirts, with red, by pressing the "paint it red" button, or "paint it green" etc., where red and green are two options from a drop-down list! Hope this helps, I apologise for my english...
LaRetta Posted February 6, 2012 Posted February 6, 2012 Hi fantasmamore, So your User has a found set of 12 Medium t-shirts now. And then the User selects Red from another drop-down and all those t-shirts inherit the color red, is this correct? What is the field name where the red will be placed within the record? Is this a LineItems table where someone is ordering t-shirts or ? A bit more information as to the purpose and the names of the tables involved will help. And welcome to FM Forums, by the way, in case you weren't properly welcomed. You have come to the best FileMaker website in existence. 1
fantasmamore Posted February 6, 2012 Author Posted February 6, 2012 Thank you LaRetta, I am very happy to find this forum! Let's say that my user has found 12 results with Medium size T-shirts. He is in browse mode, so he sees only one record at a time. I have a drop-down menu (let's call it "color_list") with 2 options. Red and Green. In order to change every single color of these 12 t-shirts, he has to go over the color_list, select "Red", then go to the next record, select "Red" and so on. What if there was a button, let's call it "colorize_red" that when the user clicks on it, every entry in the color_list menu replaces whichever value it has (red, green...) with "Red"? Then he could search for "short-sleeves", find these 8 records that match the criteria and then click on "colorize_green", in order to change whatever value there is in the color_list with the value "Green"... Or he could just see all 20 records, click on "colorize_red" and change everything to "Red". So, what am I looking for, is a method to replace a value in a specific drop-down list, on any records the user is browsing... Either a part of the records, or even all of them! Thank you!
LaRetta Posted February 6, 2012 Posted February 6, 2012 Here is a sample file which handles your request. You can replace the buttons with script trigger so that when User exits the field the scripts will fire. But I decided to leave them as buttons to keep the sample file clear and easy to understand. Let me know if I have missed the mark! Tshirts.zip
fantasmamore Posted February 6, 2012 Author Posted February 6, 2012 YOU ARE AMAZING! Thank you veeeeeeeery very much!
Recommended Posts
This topic is 4674 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