Jump to content
Salesforce and other SMB Solutions are coming soon. ×

SumText type calc


Recommended Posts



i'm almost certain this is a naughty question to ask in this forum, since someone here is bound to have had a hand in the plug-in i'm referring to, but i was wondering if anyone had come up with custom formulae that function the same way as the Troi Text plug-in? spcifically, the SumText calculations...


i read a design whitepaper the other day that suggested (and i agree) one of the worst things you can do as a developer is make your app rely on external plug-ins.


there are some very useful features of the Troi plug-in in question i have thus far been taking advantage of (i hope some of you know what i'm talking about, if not check out http://www.troi.com/software/textplugin.html), particularly for film biz application and summarizing scene-related information.


is there some way of doing the same/similar with a custom function?


for example, say i have a portal with 5 related records:



Record 1

Record 2

Record 3

Record 4

Record 5



using Troi Text i can turn that related information into a single comma-separated textfield:


Record 1, Record 2, Record 3, Record 4, Record 5


is this possible to do with a custom function?


thanks in advance experts! smiley-smile

Link to comment
Share on other sites

Sure, that can be done a couple different ways, though you may need to put the related info into a single calc field.


You could use a custom function with a GetNthRecord() function to append each related record's value to the result. Or what might be easier is to define a value list with the related field, and use a calc like this to change the line returns to commas:


substitute(valuelistitems(get(filename);"MyValueList"); ¶; ", ")


Somewhere around here I've got a calc or CF that changes the comma in front of the last item to ", and " and skips any trailing comma. The result would be:

Apples, Oranges, and Grapes

Link to comment
Share on other sites

Ha! That value list method is perfect!


Thank you so much for the insight...


If you have an opportunity, i would love to see how to make the GetNthRecord calc work... do you think it would be slower/faster than the value list method?


PS -- in FM8, at least, it seems the ValueListItems function automatically removes any trailing commas... which, by extension, i guess means there is no trailing "¶" in a value list.


Thanks again! This is awesome smiley-smile

Link to comment
Share on other sites

Note that using ValueListItems() has some side effects, which may be desirable or not, depending on your purpose:


1. Duplicate values are removed;

2. Values are sorted in ascending order.

Link to comment
Share on other sites


  • Create New...

Important Information

Terms of Use