john9210 Posted October 27, 2011 Posted October 27, 2011 FM 11 Adv. In a related table I have a field for say fruit. It contains many records for each piece of fruit: pear, grape and others. Is it possible to display a simple list of the names of the fruit in a portal without displaying all the records? For a example, simply display: apple, pear, grape, etc?. Some sort of filter?
Ron Cates Posted October 28, 2011 Posted October 28, 2011 Not sure if you truly need a portal for your purposes but if not, how about the List () function. List ( Table::Fruit ) in an unstured calc field will give you a list of unique values in the field refferenced.
comment Posted October 28, 2011 Posted October 28, 2011 List ( Table::Fruit ) in an unstured calc field will give you a list of unique values in the field refferenced. Alas, that is not so: List() will enumerate all the values in the field, including duplicates. Is it possible to display a simple list of the names of the fruit in a portal without displaying all the records? It's possible, though not quite simple. It would be better to have a third table of Fruits (where each fruit has a unique record) and point your portal to there. Why do you need this?
LaRetta Posted October 28, 2011 Posted October 28, 2011 I see so many requests for unique of a Category or Type field which exists in related table (or any field for that matter). And it isn't as difficult as one might think. One table occurrence, a sort and a filtered portal. Strive to move check box type fields to their own tables but when you can not (and I do not believe it is always the answer anyway) then this technique by Kevin Frank fits the bill. To make it even simpler, John, I created a demo addressing this very issue. Hey Ron, I think you were thinking of ValueListItems () which produces unique lists. :-) Fruit.zip
comment Posted October 28, 2011 Posted October 28, 2011 And it isn't as difficult as one might think. One table occurrence, a sort and a filtered portal. Or just a sort and a filtered portal: http://fmforums.com/forum/topic/71906-getting-more-out-of-filtered-portals-3unique-values/page__hl__filtered__fromsearch__1
LaRetta Posted October 28, 2011 Posted October 28, 2011 How could I possibly have missed this, Michael, particularly with you and John (Mr_Vodka) both on that post? Dropping that extra table occurrence absolutely rocks. :waytogo:
comment Posted October 28, 2011 Posted October 28, 2011 LOL. I'd still recommend the traditional approach (a portal to a dedicated Fruits table), if possible. Filtered portals are nice, but processor-hungry.
comment Posted October 28, 2011 Posted October 28, 2011 Actually, come to think of it, it can be better: http://fmforums.com/forum/topic/71906-getting-more-out-of-filtered-portals-3unique-values/page__p__375983#entry375983
LaRetta Posted October 29, 2011 Posted October 29, 2011 Oh yes! Even better. BTW, I realized that the technique Kevin Frank uses in his demo is identical to Mr_Vodka's, LOL. I must have been visiting on another planet that day to have missed the goodies in that thread!
comment Posted October 29, 2011 Posted October 29, 2011 the technique Kevin Frank uses in his demo is identical to Mr_Vodka's Except John posted his, what, 17 months earlier?
LaRetta Posted October 29, 2011 Posted October 29, 2011 Indeed! Which is why I didn't say 'the technique John used was identical to Kevin's', LOL. The same great idea can strike multiple times as is the case with the superconductor (watch the incredible video in this link) courtesy of School of Physics, Tel Aviv University. http://www.universetoday.com/90183/quantum-levitation-and-the-superconductor/
comment Posted October 29, 2011 Posted October 29, 2011 That's way above my head... (the only superconductor I know of is Leonard Bernstein).
Recommended Posts
This topic is 4774 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now