try using the function "List()"
type = List ( DONATION::donation_type ) ;
Substitute ( type ; ¶ ; ", " ) )
1 of 1 people found this helpful
Rather than fix the script, I'd go with a much simpler function:
List ( DONATION::donation type ) // gets the values return separated
Substitute ( List ( DONATION::donation type ) ; "¶" ; "," ) // gets the values comma separated
n.b. this assumes that the portal on the layout has no special filtering which is different from the relationship that links to the portal records.
Also, if you look up Ray Cologon's excellent XORValues ( ListA ; ListB ) function over at Brian Dunning's website, you can use it to show only unique values from the types of donations for the donor.
Substitute ( XORValues ( List ( DONATION::donation type ) ; "" ) ; "¶" ; "," )
will turn: "Benefactor¶Donor¶Benefactor¶Angel¶Sustainer"
without any scripting at all.
Also, if you really wanted to get fancy, you can look into the ExecuteSQL() function which can do all of the same tricks without even needing a linked table on the relationships graph (in case there really is a filter on the portal that you need there for a reason).
-- Drew Tenenholz
Like magic, thanks. Still learning the scripting language.
Thanks for a great resource. I will be upgrading to FMP12 Advanced soon so I can't use the custom function until then.