Order Definition (Sorting) for Lookup Lists in Edit- & NewForms
CompletedIt would be nice to have a configurable order definition for lookup lists in Edit- & NewForms.
In best way users can define one or more columns with priorities and ascending/descending choice, as we know from CAML definitions:
<OrderBy><FieldRef Name='Cost' Ascending='True' /></OrderBy>
-
This is now possible to configure, not in Editor yet, but you can simple extend the CAML query with an <OrderBy>-tag as described below:

<View><Query><Where><And><Eq><FieldRef Name="ListOneRef" /><Value Type="Text" ProviderType="FormInput">[[ListOneRef.ID]]</Value></Eq></And></Where><OrderBy><FieldRef Name="ID" Ascending="False" /></OrderBy></Query></View>
ID is the field of the target lookup list you want to order by.
This is the result in my case:

More information about the OrderBy Element (Query) on msdn.
0 -
In Modern Forms this is part of the Lookup Filter and CAML Builder: Lookup Filter - CAML Builder - Order By
0
Please sign in to leave a comment.
Comments
2 comments