Hi,


I have a combo- box as shown below:



But I want Age & Tenure to be the default value of the combo-box. Please have a look at the aggregate where I get the values:




How can I filter the aggregate to get me the 91 id to the top and all others below that?

Regards,

Manthan Shah.

Hi,

You can add another column to the table to mark the important ones. And than sort by that column and name.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi,

You can add another column to the table to mark the important ones. And than sort by that column and name.

Regards,

Marcelo

Hello Marcelo, 

How about adding a computed column to the aggregate rather than the table and sort on that column. That would also work right ? Is there any disadvantages to that compared to adding the column to the table. 


Regards

Amal


Hello Manthan,

Is this a static entity or a normal entity?
If it is a static entity, an extra attribute can be set, as per @Marcelo suggestion.

Just remember that if this is a "normal" entity than you have a more complex scenario. Because you can't guarantee that this record's ID will be always the same, or its name, or even that the record will exist.

So, you will have to let the users decide which record to be the "first" in the list (using @Marcelo's approach). 

Cheers.

Hi Amal,

If exists a rule you can compute yes you can use that solution. If not you need to mark the record on the database.

Regards,

Marcelo

Hi Friends,

I was able to do the needful by giving the variable an Identifier for that id. Please see the solution screenshots below:



Regards,

Manthan Shah.

Hello Manthan,

DON'T.
Don't do that.

When deploying your application between environments, the ID will likely to change.
If you delete data and insert it again, the IDs will change.

DON'T do it. Do not use ID values in your code.

Cheers.

Eduardo Jauch wrote:

Hello Manthan,

DON'T.
Don't do that.

When deploying your application between environments, the ID will likely to change.
If you delete data and insert it again, the IDs will change.

DON'T do it. Do not use ID values in your code.

Cheers.

Then how can I achieve it?

Hello Manthan,

If you are not using a Static Entity, where you could add an attribute and set the record you want to be the first, but instead is using a normal Entity, depending on how you are dealing with it, you a have few options.

1. The entity is feed by Bootstrap and users can't change it (you don't allow them to add, delete or change records). 

You can use the description (the name) to set the record that is "important" and this way put it in the first place. I don't like this solution, but it will work as long as no one changes the description.

2. The entity can be changed, including the description of the records. 

In this case, you HAVE to add an attribute to the entity so that the user can mark which option is the one to appear first, and will have to live with the fact that this will be the User that has access to this data that will decide which record should be the "default" one.

Not seeing any other way of doing this that will not have the same problems.

Cheers.