C#[PersistentAlias("Iif(Invoice.Payments[PaymentDirectionType = 'Inbound'].Count() > 1, 'Multiple', Iif(Invoice.Payments[PaymentDirectionType = 'Inbound'].Count() = 0, '', Invoice.Payments[PaymentDirectionType = 'Inbound'].Single(PaymentType.Name)))")] public string PaymentType { get { return (string)EvaluateAlias("PaymentType"); } }
Sorry there is no sample yet. But basically, I added this property
The logic works great, but when sorting a listview by this property, it hangs and never recovers. Even with a very tiny data set.
If I change the Single to anything else sorting is fine. That's how I know the Single is messing it up.
Actually, it might be the "Multiple" string. If filter the column I can filter by all paymenttype names, but when I try to create the filter on "Multiple" that's when it hangs.
Only happens in Server Mode, by the way. With Server Mode at false it behaves fine.
Here is your MainDemo doing it.
I added a property to Department called "ContactName" which performs the same logic. If there is more than one contact, Contact Name = "Multiple Contacts" -- otherwise it's the single object.
Run attachment, go to Department ListView. Create a new department with 2 new contacts and save. On the Department Listview, attempt to sort by ContactName.
Thank you for your report. We need some time to research this issue. We will get back to you once we have any results or need extra information. Your patience is appreciated.