here's the lookup relationship.
This appears to be the problem:
Discussions Line for current status :current line index = Discussion Line Items:Discussion Line Items id
Discussions Line for current status :current line index = Max(Discussion line items::discussion line items id)
I don't see any way that can work. If you add a 3rd occurrence of line items and link it in a relationship so that you can reference it in the Max calculation this should work, but I suspect that you can also reference the desired record if, instead of using Max, you just sort the records in the relationship by discussion line items id in descending order.
thanks. I have done the second suggestion - see attached screen shots but still get blank result.
Not quite, your setup is still has a circular definition.
The value of current discussion line index is still dependent on the relationship between the two table occurrences in which it in turn is used as a match field.
From what set of records in Discussion Line Items do you want to reference the one with the largest ID? All the records in the table? or just those for a particular customer?
I want to reference the one with largest ID on a particular discussion. thanks
Then with this relationship:
Disscussions::Disccussions id = DiscussionLineItems|LargestID::Discussion id
You need only double click the relationship line and specify a sort order for DiscussionLineItems|LargestID that sorts the records in order by Disscussion Line items Id in descending order.
THen, if you place fields from DiscussionLineItems|LargestID on a layout based on Dissucssions, you'll see data from the related record with the largest Disscussion Line items id. A portal to this table will list the most recently created record first in the portal.