Hi All
I am working on a reactive web application, I have a static entity and I need to display the record values in a dropdown. I have three values "Inbox, Archive and Physical Delivery". My dropdown has to be listed as "Inbox, Physical Delivery and Archive". But entity is sorted and my dropdown values are "Archive, Inbox and Physical Delivery". Is there a way to remove the sorting?
Hello Kavya,
I implemented a static entity as your and did the changes as I mentioned in my above post, It is working as expected. have a look on these screens :
After changing the order :
Aggregate :
(You can observe the ID's for its initial order)
Here is the result I got after changing order and adding sorting in aggregate :
There may be just one issue in your case, i.e. you might not have published your DB module if it is in another module. Otherwise it will definitely work.
If still issue persist, kindly post OML or screens of above things.
Thanks,
Sanjay
Sanjay Kumar Sahu wrote:
Thank you so much for the time and effort Sanjay . I tried the same with the aggregate and it worked fine for me.
I'm not sure about removing sorting from static entity but You can always change the order of your attributes in static entity. See below for Ex:
Let me know if solves your problem.
Regards,
Thanks Sanjay. I have mentioned the order for inbox as 1 and for physical devlivery as 2 and for archive as 3 but still its sorted in ascending order
Hi!
Static entities normally have a field called "order". I suggest you use that field to order the list.
Stay safe
Graça
Hi Kavya,
Kindly check if you have sorted by the order value as below given image:-
Chockalingam Saravanan
Chockalingam Saravanan wrote:
Thanks Chockalingam. I did try this way also, but it is not working for me
Hi Kavya ,
You can set order value in static entity and apply sorting on order value.
i hope it will be helpful to you.
Thanks
Rahul Jain
Rahul Jain wrote:
Thanks Rahul. I have sorted using order, however in my dropdown I can see only archive first.
Could you share the oml ,So that we could identify the issue!
kavya anbazagan,
What is the content of the order field for your records?
Maria da Graça Peixoto wrote:
Sorry Maria I'm not able to understand this question properly
What is the value on that order field for each of your records in your static entity ?
Thanks Maria. I gave order value as 1 for inbox, 2 for physical delivery and 3 for Archive. I tried the same using an aggregate and it worked fine for me.
Ok, there seems to be a lot of noise in this topic, while in fact it's pretty simple. If you specify a Static Entity as Source Entity instead of supplying a Source Record List, the Platform will query the Static Entity for you. If the Static Entity has an "Order By Attribute" defined, the Platform will sort by that Attribute, ascending. If you have created a Static Entity and didn't change the default Attributes, that will be the Order Attribute. If the Static Entity does not have an Order By Attribute specified, the Platform will not sort the list, but since it's a simple "SELECT * FROM MyEntity", both MS SQL and Oracle will return the results sorted by Id.
That's it. There's no need to create an Aggregate that sorts by Order, as long as you have Order set as Order By Attribute.
EDIT: In Reactive, there is no 'Source Entity', but if you create an Aggregate by dragging the Entity, it'll automatically include a sort on the Order By Attribute.
Kilian Hekhuis wrote:
Good explanation Kilian! I never explored More Options tab, Thanks for this simple way.
Thanks Kilian. It worked for me