Jump to content




Replace all in Find Mode!



  • Please log in to reply
7 replies to this topic

#1 OFFLINE   fantasmamore  member

fantasmamore
  • Members
  • 13 posts
  • FM Client:11 Advance
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Entry Level
  • Time Online: 10h 30m 37s

Posted 05 February 2012 - 01:15 PM

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!

#2 OFFLINE   comment  consultant

comment
  • Members
  • 21,137 posts
  • Time Online: 187d 10h 40m 8s

Posted 05 February 2012 - 03:03 PM

Quote

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.

#3 OFFLINE   Cliff Zhou  member

Cliff Zhou
  • Members
  • 9 posts
  • LocationQingdao,China
  • FM Client:11 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Time Online: 2d 8h 2m 52s

Posted 05 February 2012 - 06:23 PM

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.
FMP User in Qingdao City of China.......
Blog: www.mao100.com
Garments International Trading

#4 OFFLINE   fantasmamore  member

fantasmamore
  • Members
  • 13 posts
  • FM Client:11 Advance
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Entry Level
  • Time Online: 10h 30m 37s

Posted 06 February 2012 - 12:47 AM

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...

#5 OFFLINE   LaRetta   Lifetime Student

LaRetta
  • Members
  • 8,061 posts
  • LocationOregon
  • Time Online: 57d 23h 32m 6s

Posted 06 February 2012 - 08:03 AM

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.  :laugh2:

You have come to the best FileMaker website in existence.
Each assumption is an educated guess, a likely condition or event, presumed known and true in the absence of absolute certainty.

#6 OFFLINE   fantasmamore  member

fantasmamore
  • Members
  • 13 posts
  • FM Client:11 Advance
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Entry Level
  • Time Online: 10h 30m 37s

Posted 06 February 2012 - 09:42 AM

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!

#7 OFFLINE   LaRetta   Lifetime Student

LaRetta
  • Members
  • 8,061 posts
  • LocationOregon
  • Time Online: 57d 23h 32m 6s

Posted 06 February 2012 - 11:41 AM

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!

Attached Files


Each assumption is an educated guess, a likely condition or event, presumed known and true in the absence of absolute certainty.

#8 OFFLINE   fantasmamore  member

fantasmamore
  • Members
  • 13 posts
  • FM Client:11 Advance
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Entry Level
  • Time Online: 10h 30m 37s

Posted 06 February 2012 - 11:59 AM

YOU ARE AMAZING! Thank you veeeeeeeery very much!


Back to Managing Scripts


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users

FMForum Advertisers