Navigating from sorted first element to other associated ent

Posted by Gebrekiros Abraha on 14-Dec-2016 15:32

Let Entity1 has One to Many association with Entity2. I want to sort Entity1 collection based on some attribute and then pick the first record, then I want to navigate to Entity2 from the first picked entity.I can sort collections in Entity1 and pick first element like this entity1->sortedBy(DATE)->first . But, To navigate to the records on Entity2 from the first element of Entity1 how do you do that? I tried this way but it did not work  entity1->sortedBy(DATE)->first.entity2.Country='US'

All Replies

Posted by mparish on 14-Dec-2016 16:26

Not sure why that syntax is not supported.
Maybe engineering can comment on that.
This screen shot shows an alternative way to do it (maybe there’s an simpler way)
Note that E2 is a many association so there could be several countries, some US and some not US.
Is that what you intended
 

Posted by James Arsenault on 16-Dec-2016 16:19

I agree, the syntax seems correct. Here row e is a combination of b and d which are each valid. It's likely a limitation in the parser. I'll open a bug but for now you'll need to use the two step process as Mike described.

This thread is closed