Sorting data in work with pattern in genexus according to a particular attribute - genexus

How to sort data in work with pattern in genexus according to a particular attribute? please give me the code segment for putting in load event.

In the pattern object, right-button click in the object you want to edit, Add > Orders, and then create a new order with the desired attribute.

Related

Ember sorting/filter table

I am looking to add a filter/sorter table into the application. I need to choose which column can be sorted - and provide change of class glyphs up/down arrows on the columns. The filter box also needs to be outside of the table.
I tried looking at this example, but there are no glyph class changes on the cols and the filter box is inside the table.
http://crodriguez1a.github.io/ember-sort-filter-table/
I looked at this custom solution, but I couldn't see a way of locking the filter to specific cols.
http://www.jarrodctaylor.com/posts/Filter-And-Sort-Tables-In-Ember/
http://emberjs.jsbin.com/yezonaxu/12/edit?html,css,js,output
what about this one -- http://onechiporenko.github.io/ember-models-table/v.2/docs/classes/Components.ModelsTableRowFiltering.html
but the problem here - is how to create some custom markup depending on the data.
You could sort and filter your rows using computed properties. For sorting you could use sort macro. For filter you should implement your own logic, cause filter and filterBy macros does not support observing a value used to filter the array. Use the sorted and filtered rows to generate a simple HTML table or pass it to a table component of your choice.
If you will take DataTables and wrap it in ember component (custom code would work better that some generalized 3rd-party wrapper), you can achieve a lot. Including filtering by columns. It's a bit hard way, though - DataTables is big and it's API is a bit complicated. That's if you want client-side filtering.
For server-side filtering approach would be different - you render UI for filters using ember's methods, convert user's choices to string and pass that to API (which should be modified to support filtering) when asking for data.

Tableau action filter not working issue

As per my experience - In tableau for action filter to work the fields should meet two criteria.
1. Field should be a dimension.
2. Field has to be from same data sources. Blending and action filter dont work together.
Am I correct in saying that?
Yes, you are correct that is generally the rule of thumb. But, there are a couple of workarounds, however.
Method 1: Create a custom parameter and use it in a calculated field
Method 2: Create a control view for the field you want to filter on, and apply a filter action to that view on the dashboard
This is a link to a knowledge base article that details both methods mentioned.

How to create a help-form in FormsBuilder?

I am required to make a form which will contain important keywords and their description, with the possibility to search between the words. It is loaded from the Help menu and it is designed to give the users detailed help informations about other components. (Just like every application's Help menu)
I only used forms to query tables, and I was wondering, what is the correct way to achieve this? Does Oracle support any feature that would auto-generate a help-form based on my 'Help' inputs from Property Palettes? or do I have to manually write data into a canvas? if so, how can I search through it?
I considered creating a table and writing help informations in it, but I don't think that is the correct way.
Oracle Forms, unfortunately, does not give you programmatic access to values stored in property palettes, so your solution will need to be custom made.
Create a table, e.g. HELP_TOPICS (keyword, help_text), add a list item that contains all the keywords; when a user selects a keyword, query the table to find the help text, and set the value on a display-only text area item on the page.

Controling Edit, Delete on individual items

Is there a way to enale/disable the edit and delete on individual entity instances using a propery on the entity when displaying in the List control?
H Marius, I have a security sample that uses routing to do this sort of thing, what is it exactly you are trying to do achive?

Filter/Sort in the view or in the model?

Having a list of data object and something visual to represent each, where would you code the sorting/filtering logic? Why?
Edit : All the answers so far are good, but I forgot to add another constraint. What if I don't want to reconstruct the view each time?
The answer lies in the data. The model delivers the data. If all the data is in the view, the filtering and sorting can be contained within the view. If the data is chunked, the model must deliver the data and contain some of filtering/sorting (the view may still contain filtering/sorting as well).
The controller should not contain these functions, since it is a routing mechanism and should not have any idea of how to interpret the data.
Depends on the complexity of the sort/filter operation and whether the view control offers those services natively. If the view control offers filtering and it's simply reformatting the in-memory data then leave it in the view. If the sort/filter requires another trip to the data source then keep it all in the controller.
I would put in the sorting and filtering methods in the controller, and call these methods from the view.
Your View should only handle displaying the output. Put any filtering/sorting into your business logic and return it to the view.
I believe the sorting should be something separate. You should not sort in the model because you want to keep it as-is. Basically, a change in the model implies a re render of the view and you probably do not want that (if you want to animate a transition between the pre and post filter states, for example).
What I would suggest is that the model provides the data to create both a list of visual objects for the view and a sorter object. The sorter object would output a render list which would simply be a list of some identifier linked to the visual objects (index in objects list or other). The order in which the IDs appear represents the order of the sorting and any ID not in the render list is hidden. Every time the view receives a render list, it would update it's display.

Resources