Does af:select one choice supports range size concept? - oracle-adf

I have select one choice component dragged on to the page as filter. I have around 20 columns and each column is having select one choice as filter. and each filter having more than 1000 records. So, as the record count is much it is taking much time to load the page so, through view Accessor I have tried to display the data on to my component.
Still it is fetching all records in case soc. Is there any way to restrict the selectonechoice component to fetch all the data?

Yes. Use iterator's property rangeSize to limit selectOneChoice record count in case that you using separate ViewObject for this LOV.
If you use embeded LOV for ViewObject attribute, then you need to edit corresponding accessor's property, tuning section. Retrieve row from database, only up to row number. Set required value there.

Related

Table with multiple search bars and add object logic

I have a table with multiple columns that I want to search through with multiple search bars (one for each column). I'm using MUI Datagrid table. You may think- that's filtering not quick search. You are correct, but I need to use the search/filter queries to add that object to the table IF it doesn't exist in the table. So to be clear- user has a table that he filters, he decides the object he searches for isn't there so he decides to add it with the search words. What I think of is- getting the data from my backend, passing it to the fuse.js instance, then somehow passing that to the MUI Datagrid. Is this the correct aproach or am I missing any plugins I could utilize?

Google Data Studio - Is it possible to filter across data sources

I have seen the link below which explains that it is possible to create a filter on one field between sources by generating a calculated field and then assigning the same field ID to both fields for filtering purposes:
Using the same filter control for two different data sources
But my question is whether or not it is possible to make that particular field (that is now shared between 2 data sources) dependent on other filters that are tied to 1 of the data sources?
Example would be:
One dataset with country name and city name
One dataset with city name and population
I've generated a calculated field to be able to filter on city name since they now share the same field_id.
What I'd like to do is use a control that selects country from dataset 1 and then automatically filters city_name in both datasets.
I realize I could just pull country name into my dataset in the example above, but in my real dataset there are a significant number of fields I'd be looking to be able to use for filters.
If a filter is set, all charts and filters are updated with that setting. However, it would be a huge mess, if any of these objects would automatically changes the filters again. Then all object would be updated again and the filter setting could be changed once more, thus ending up in an infinity loop.
Therefore, a filter can only apply to a field. If this should cause further filtering an user action is needed. It would be possible to write a customer vizualisation, which would mimic an user action, but again it could end in an infinity loop.

Is there any js function function to fetch the complete data from pagination

My task is to enable the user to select only a single row from the entire table by using checkbox.
When user select any single row , checkbox for the other rows are disabled. But this is happening only on single page.
Since my table has large amount of data and pagination is applied. The above mentioned logic is functioning properly but when I move to other page of table , there user is again able to select some another row but this should not happen as the requirement is that user should only be able to select a single row throughout the table.
3)Help me out in telling that how to fetch the entire data from the table where pagination is applied because document . Get Element By Name only functions on single page and not on entire table
Keep a variable in the state selectedRowId, every time the table renders enable checkboxes on the bases whether selectedRowId is null or not.

filter data from one table based on second table without duplicates

Note: I'm working with a large complex database, so for clarity's sake I have simplified the set up below.
I struggled a bit with how to title the question since it's a bit of a complex question. I hope it's accurate enough....
A bit of background first:
I have an Access 2010 database that contains a one-to-many relationship between a table Called "Products" and a table called "Datasets" (ie I have a bunch of products, and each product has multiple datasets). Each has an autonumber key field (p_ID and d_ID respectively) as well as numerous other fields.
I have a form (lets call it frm_Main) that has two subforms: sub_Products (based on the "Products" table) and sub_Datasets (based on the "Datasets" table). On the main form I have a control ctrl_SelectedProduct which is linked to [sub_Products]![p_ID] to see which record in sub_Products is selected / has the focus, and the sub_Datasets subform is linked to this control so that it only displays Datasets records that belong to the selected Products record.
On the main form I also have a number of controls that I'm using for filtering the data in the subforms. For example, I have a control ctrl_Category. I have this control coded so that when the user changes the value of the control, a filter is applied that limits the records in sub_Products to only those that have a p_Category value equal to whatever is chosen in ctrl_Category. If the control is blank, it will show all records. All this works great when if comes to filtering based on fields in the Products table.
Now the problem:
My problem is that I also want to be able to filter based on fields in the Datasets table. For example, Datasets has a field called d_Status. I want the user to be able to chose the status in a control (ctrl_Status), and based on this:
1) sub_Products will be filtered to display only those Products records that have an assotiated Datasets record (or records) that has d_Status equal to whatever was chosen in ctrl_Status
then
2) when a Products record is selected in this filtered sub_Products, sub_Datasets will only show the Datasets records that has d_Status equal to whatever was chosen in ctrl_Status
I know how to do part2. But I have no idea how to get part1 to work. Since sub_Products is currently based on the Products table, which does not have the d_Status field, I have no way to filter it based on that field. Thus, I'm assuming my first step will be to change my setup so that sub_Products is based on a query that combines the two tables (or at least adds the d_Status field).
If I do that, however, I get duplicate Product records. I can't use the query's Unique Values property because if I have a product that has two datasets, one with status "Current" and a one with status "Archived", then those aren't considered duplicates, and the product info is there twice. If I don't have the status field displayed, it shows only unique products initially, but then I can't subsequently apply a filter based on that non-displayed field.
I also tried basing sub_Products on a Totals query in order to utilize the Group By functionality, but I still couldn't get it to work right. Even if I could I don't think that's the best solution, because you can only have 10 fields with Group By, and my Products table has more than 10 fields that I need displayed in sub_Products.
I feel like I'm now just going around in circles and am at a loss of what to try from here. Please help!
Couldn't you add something like this?
Private Sub ctrl_Category_AfterUpdate()
Form_frm_Main.Recordsource = "Select * from Products where p_ID IN(" & _
"Select p_ID from Datasets where d_Status = " & _
Me!ctrl_Category.Value & ")"
End Sub
Alternately, you can access the childform via the parent of the other child form.
This is a non-working snippet just to give you the idea:
Me.Parent.otherChildFormName.Form.Recordsource = whatever

How do I disallow incomplete rows from being added in my DataGrid?

I have a DataGrid (currently the .NET 3.5 WPFToolkit version, but I can use the .NET 4.0 out-of-the-box DataGrid if needed) bound to a collection of objects. Three of the columns in the data grid represent pieces of information used as a key to grab other information from the database. This other information is used in calculations to populate other columns of the data grid.
Once the user enters these three fields, and the combination of the data in those fields exists in the database, the row is considered valid for adding to collection. The user is also now allowed to freely edit the other columns in the row. Once any other column is given data by the user, the three "key" fields are considered "locked" - the user may no longer edit them. The only way to change that information is to delete the entire row and add a new row.
1) What is the best way from a UX perspective to handle this? Should I allow the user to enter data in any column, "cache" their entries, then do my calculations all at once only after the "key" data is entered? Or should I restrict the user to only enter the "key" data first, then allow the user to enter data in the other columns?
2) What is the strategy (event handlers I need, etc.) for implementing the above in the data grid? How do I not allow the new row to be added to the data bound collection until it has valid "key" data, or do I allow the new row to be added with validation errors and somehow track that it is ok for the user to continue editing the "key" columns of the partially complete row, but not other existing rows in the data grid?
This is what I did for my particular situation:
1) The best way to handle this is to give the user the most flexibility possible. This means allowing the user to edit the key data under certain conditions, but not restricting the user to entering key data first.
2) The strategy for implementing that has two parts. First, define when the use is not allowed to edit the key data anymore, and add styles to the datagrid columns that switch the key value columns to a read-only mode based on a trigger. Second, when key data is changed, perform all of the logic behind-the-scene as if the row were deleted using the old key data and then created using the new key data. This will cover all of the side-effects I need to have happen.

Resources