i have one column on table which is not coming from db table . Actually this is evaluated from expression. So how i can sort it?
Hi Lovish,
In this case, none. When it is a calcualted column, you give it a name and use only its name.
For example, if you do an aggregate GetUsers with User entity, and wants to sort by name, you would use {User}.[Name] in the ListSort_Column widget, as Name is an attribute of entity user.
But if you have a Calculate field to concatenate Name and email, like this: User.Name + " (" + User.EMail + ")", And you give it the name UserInfo, in the ListSort_Column widget you would use simply UserInfo, no entity name (as it isn't an entity attribute) and no [ ] around the name of the attribute, because it is a calculated field.
Just use the name you gave.
Cheers,Eduardo Jauch
Eduardo Jauch wrote:
Hi,
I am doing the same but still getting this error: 'Current' found in 'Order By' parameter is an invalid Entity.
As you can see I have "Approval" column in aggregate and using same name in List_SortColumn.
Pratima Solanki wrote:
Hello Pratma.
Try to logout and login.The message says to me that you used a {Current}.... before, and changed to Approval, but your session is still valid and he does not change the previous value because of that.
Usually logout/login solves this problem.
Cheers.
Hi lovish,
If is an expression evaluated in table in screen, you can't. Not without JavaScript and would never be perfect.
If you can, move it to a calculated column in the aggregate, and now this column can be sorted.
Cheers,
Eduardo Jauch
which entity we have to mention for that aggregated column?
Alternatively, you can use ListSort to sort the list, but this has some drawbacks, like not working nicely together with the RichWidgets column sort, and not working well if you have paginated data and don't want to retrieve (and calculate) the data for all pages.
Hi Lovish
If Eduardo answer your question, mark it as correct. That will help other to find answers to similar questions.
Thanks
Thank You Eduardo, It solved my problem :)