223
Views
18
Comments
Solved
avoid sorting in static entity

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?

2020-07-29 19-08-40
Sanjay Kumar Sahu
Solution

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



UserImage.jpg
kavya anbazagan

Sanjay Kumar Sahu wrote:

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



 Thank you so much for the time and effort Sanjay . I tried the same with the aggregate and it worked fine for me.

 

2020-07-29 19-08-40
Sanjay Kumar Sahu

Hello Kavya,


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,

Sanjay

UserImage.jpg
kavya anbazagan

Sanjay Kumar Sahu wrote:

Hello Kavya,


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,

Sanjay

 

 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

2018-06-05 16-54-03
Maria da Graça Peixoto

Hi! 

Static entities normally have a field called "order". I suggest you use that field to order the list. 

Stay safe

Graça  

UserImage.jpg
Chockalingam Saravanan

Hi Kavya,

      Kindly check if you have sorted by the order value as below given image:-

Regards,

Chockalingam Saravanan

UserImage.jpg
kavya anbazagan

Chockalingam Saravanan wrote:

Hi Kavya,

      Kindly check if you have sorted by the order value as below given image:-

Regards,

Chockalingam Saravanan

 Thanks Chockalingam. I did try this way also, but it is not working for me

 

2020-08-31 05-04-40
Rahul Jain

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

setorderval.PNG
UserImage.jpg
kavya anbazagan

Rahul Jain wrote:

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

 

 Thanks Rahul. I have sorted using order, however in my dropdown I can see only archive first. 

UserImage.jpg
Chockalingam Saravanan

Hi Kavya,

    Could you share the oml ,So that we could identify the issue!


Regards,

Chockalingam Saravanan

2018-06-05 16-54-03
Maria da Graça Peixoto

kavya anbazagan

What is the content of the order field for your records? 

UserImage.jpg
kavya anbazagan

Maria da Graça Peixoto wrote:

kavya anbazagan

What is the content of the order field for your records? 

 

 Sorry Maria I'm not able to understand this question properly

2018-06-05 16-54-03
Maria da Graça Peixoto

What is the value on that order field for each of your records in your static entity ?

UserImage.jpg
kavya anbazagan

Maria da Graça Peixoto wrote:

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.

 

2020-07-29 19-08-40
Sanjay Kumar Sahu
Solution

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



UserImage.jpg
kavya anbazagan

Sanjay Kumar Sahu wrote:

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



 Thank you so much for the time and effort Sanjay . I tried the same with the aggregate and it worked fine for me.

 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

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.


2020-07-29 19-08-40
Sanjay Kumar Sahu

Kilian Hekhuis wrote:

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.



 Good explanation Kilian! I never explored More Options tab, Thanks for this simple way.

 

UserImage.jpg
kavya anbazagan

Kilian Hekhuis wrote:

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.



 Thanks Kilian. It worked for me

 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.