Results 1 to 4 of 4
Thread: Condition List
-
03-13-2012, 10:55 AM #1Preferred Member
- Join Date
- Aug 2005
- Posts
- 600
Condition List
I have a found set where records show a cost value, tableA::Cost. and a color, tableA::Color.
I need a calculation for a script that list the Cost for all records where color = red. Example 2, 3, 5, 6, 8
My thought is to set a variable of each list as I need for color = red, blue and green
thanks,
Jim
Warning: This is an Old Thread
This discussion is older than 420 days. information contained in it may no longer be current
-
03-13-2012, 02:36 PM #2Senior Moderator - Consultant - West Coast USA
- Join Date
- Mar 2006
- Posts
- 2,216
- Location
- Southern California
- FileMaker Version
- FM 11 Developer
- OS
- Windows & Mac
- Skill Level
- Intermediate
Re: Condition List
Make a table where all colors and their corresponding costs are contained.
Example
Red...2
Red...4
Red...5
Blue..3
Blue..5
etc.
Create a new global field called "Color." Make a value list from the table and use the global field for the "Include only related values..." setup step. Use a script trigger "On Object Modify" such that when the color is chosen, the global color field is set with the chosen color.
For more information on "Conditional Value Lists" go to the 2nd post of this thread.
-
03-13-2012, 03:13 PM #3Preferred Member
- Join Date
- Aug 2005
- Posts
- 600
Re: Condition List
I tried a script that looks like this:
Go to Record/Request/page [first]
Loop
If (TableA::Color=Red)
Set Variable [$Red ; value: $Red & TableA::Cost & ","]
ElseIf (TableA::Color=Blue)
Set Variable [$Blue ; value: $Blue & TableA::Cost & ","]
ElseIf (TableA::Color=Green)
Set Variable [$Green ; value: $Green & TableA::Cost & ","]
Go to Record/Request/Page [next ; exit after last]
End Loop
Set Field [$Red ; value: Left ( $List ; Length ( $List ) -1 ) //strip off the extra comma]
Set Field [$Green ; value: Left ( $List ; Length ( $List ) -1 ) //strip off the extra comma]
Set Field [$Blue ; value: Left ( $List ; Length ( $List ) -1 ) //strip off the extra comma]
-
03-13-2012, 03:46 PM #4Senior Moderator - Consultant - West Coast USA
- Join Date
- Mar 2006
- Posts
- 2,216
- Location
- Southern California
- FileMaker Version
- FM 11 Developer
- OS
- Windows & Mac
- Skill Level
- Intermediate
Re: Condition List
So you do NOT need a value list (my error there), but a script that gives you a final list after the script is run?
Edit: Instead of using this command line in the script -->Set Variable [$Red ; value: $Red & TableA::Cost & ","]
why not use ---> Set Variable [$Red ; value: $Red & ¶ & TableA::Cost]
?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
put a button in IF condition
By fmruser in forum FileMaker Pro 9Replies: 6Last Post: 02-05-2009, 02:44 PM -
Value list with calc or condition?
By Hawaii80 in forum Value ListsReplies: 13Last Post: 04-27-2008, 03:41 PM -
Conditional Value List with hidden condition?
By joraff in forum FileMaker Pro 7.0Replies: 3Last Post: 06-28-2007, 01:26 PM -
Summary with condition
By palba in forum FileMaker Pro 7.0Replies: 5Last Post: 07-04-2006, 12:46 AM -
sum by condition
By axis3 in forum FileMaker Pro 7.0Replies: 3Last Post: 09-10-2005, 04:43 PM





Reply With Quote



Bookmarks