![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a portal showing "Description" and "Cost" from a related file. Description is a text field, and Cost is a number field. Using a calculation field I can add up the total cost of related items (using the Sum function), but I would like to also created a calculated text field which would contain something like "Item1, Item2, Item3" (just concatenating all related Description fields with a comma). I need this for a merge field in a contract. I can't seem to figure out how to do this. I know I can use a script to do it, but that could introduce problems if the fields are updated but the script doesn't get run. Any ideas would be greatly appreciated. Thanks, Anthony |
#3
| |||
| |||
|
|
On 03/14/2007 16:32:11 acuc... (AT) gmail (DOT) com wrote: I have a portal showing "Description" and "Cost" from a related file. Description is a text field, and Cost is a number field. Using a calculation field I can add up the total cost of related items (using the Sum function), but I would like to also created a calculated text field which would contain something like "Item1, Item2, Item3" (just concatenating all related Description fields with a comma). I need this for a merge field in a contract. I can't seem to figure out how to do this. I know I can use a script to do it, but that could introduce problems if the fields are updated but the script doesn't get run. Any ideas would be greatly appreciated. Thanks, Anthony Script concatenation of the text fields into a global field. Something like (pseudo): Go To Related Record [ Whatever Table, Whatever Layout, Show only Related Records ] Sort Records as necessary Go To Record [ First ] Loop Set Field [ gText ; gText & ", " & Item ] Go To Record [ Next, exit after last ] End Loop Go To Layout [ Original Layout or wherever ] Depending on version, you could concatenate into a script variable, then put that into a destination field at the end. Matt |
#4
| |||
| |||
|
|
I have a portal showing "Description" and "Cost" from a related file. Description is a text field, and Cost is a number field. Using a calculation field I can add up the total cost of related items (using the Sum function), but I would like to also created a calculated text field which would contain something like "Item1, Item2, Item3" (just concatenating all related Description fields with a comma). I need this for a merge field in a contract. I can't seem to figure out how to do this. I know I can use a script to do it, but that could introduce problems if the fields are updated but the script doesn't get run. |
#5
| |||
| |||
|
|
acuccia (AT) gmail (DOT) com wrote: I have a portal showing "Description" and "Cost" from a related file. Description is a text field, and Cost is a number field. Using a calculation field I can add up the total cost of related items (using the Sum function), but I would like to also created a calculated text field which would contain something like "Item1, Item2, Item3" (just concatenating all related Description fields with a comma). I need this for a merge field in a contract. I can't seem to figure out how to do this. I know I can use a script to do it, but that could introduce problems if the fields are updated but the script doesn't get run. You don't say what version of FileMaker you are using. If you are on FM 8.5, then take a look at the List() function. If you are on FM7 or higher, take a look at Brian Dunning's website http://www.briandunning.com/filemaker-custom-functions/> for a custom function that will fit your needs. If you are on FM6 or below, then you can use the ValueListItems() function as long as each record's text is under a certain number of characters (64 characters IIRC?) |
#6
| |||
| |||
|
|
You don't say what version of FileMaker you are using. If you are on FM 8.5, then take a look at the List() function. If you are on FM7 or higher, take a look at Brian Dunning's website http://www.briandunning.com/filemaker-custom-functions/> for a custom function that will fit your needs. If you are on FM6 or below, then you can use the ValueListItems() function as long as each record's text is under a certain number of characters (64 characters IIRC?) acuc... (AT) gmail (DOT) com wrote: I have a portal showing "Description" and "Cost" from a related file. Description is a text field, and Cost is a number field. Using a calculation field I can add up the total cost of related items (using the Sum function), but I would like to also created a calculated text field which would contain something like "Item1, Item2, Item3" (just concatenating all related Description fields with a comma). I need this for a merge field in a contract. I can't seem to figure out how to do this. I know I can use a script to do it, but that could introduce problems if the fields are updated but the script doesn't get run. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Howard Schlossberg (818) 883-2846 FM Professional Solutions, Inc. Los Angeles FileMaker 8 Certified Developer Associate Member, FileMaker Solutions Alliance |
![]() |
| Thread Tools | |
| Display Modes | |
| |