1
votes

I have an app that is using one repeat control inside of another repeat control. The outside control uses a simple DbColumn to capture data from a view column. I have a computed field to display the list from the repeat control. The inside Repeat control uses a simple DbLookup based on the list from the outside repeat control. I display that data using a link. The issue is, The repeat control that uses the DbLookup will not display the corresponding data from the outside repeat control unless there are a minimum of two documents to display. If the outside control lists Company A, and there is only one purchase order document associated with Company A, it won't display. As soon as you create a second document for Company A, both documents display as designed. This is happening on two separate apps I'm working on. Is there something I'm doing or NOT doing?

2

2 Answers

3
votes

This is because @DbColumn() doesn't return an array if there's only 1 result - instead it returns a string.

I will recommend that you use this improved version of DbColumn and DbLookup that handles this and more - including support for caching: http://openntf.org/XSnippets.nsf/snippet.xsp?id=dblookup-dbcolumn-with-cache-sort-and-unique

0
votes

Wrapping the @DbLookup / @DbColumn in an @Explode may solve your problem. @Explode should return an array.