How to condition an APEX LOV when using APEX_ITEM to create a dropdown list within an interactive report? - conditional-statements

Hi everyone I am having a bit of a difficult time even trying to find articles on apex collections and the apex_item functionality but was wondering if anyone has any experience on how to condition a LOV when the the select list has been generated using APEX_ITEM.SELECT_LIST_FROM_LOV.Im still pretty new to using this functionality so I hope this does come across well and makes some sense!
I am currently using Apex 19.1 with oracle database 12c!
We have an apex app we are building and our users want the app to allow the user to pick the number of rows as the number of rows needed can vary for each user, so we achieved this by creating a page item that allows the user to select a number from 1 to 50 - this then generates an interactive report based on this number where the user can then select a further options within 3 select lists as shown below.
We have shown this concept to the business and they really like how this all works. They have identified a requirement where they would like these select lists to then be conditional before the selection is then passed into apex_collections so that when the 'Export From' option is selected it will only allow the user to see the countries that are available within the 'Import To' select list. Furthermore once the country has been selected they want the 'Depot DST' option to only show the available options for the selected country.
I have attempted to look at the select query within the shared component LOV for the application and change this around but I assume because there is no page item associated with the selected values that this wont work as the select list keeps going blank when testing out any changes I make. Any help or advice on how to achieve this would be greatly appreciated.
Regards,
Helen.

have you tried this:
under columns of your report select the column you want to be conditionally filled, when select on the right side of the apex developer look for the List of values submenu and the Cascading LOV Parent Column(s)
there select your parent column and incorporate the column in the where clause of your select for the list of values, pointing at it like this :YOUR_COLUMN NAME

Related

Drop-Down Box in a Selection Query - MS ACCESS

I'm working on a selection query in my Access database. in one of my columns I wanted to have a drop-down list with selected data. Unfortunately nothing is showing, and I'm thinking about two Problems that can be responsible for this :
The selection wont show up until I link my query to a table where I can modify and select from the drop down list.
I made a mistake in developing but can't find anything about that mistake
Here is the details of whats going on :
What I want
This image is just the result of my query not linked to a table
What I have
Is an actual drop down list without any data in it (still talking about the result of the query not linked to a table in which modification can be made directly)
Here is What I did
Added the queries and tables I'm working on and then =>
Selected the column I wanted it to be a drop-down list and then added the following query after changing it to a drop down list
SELECT [SALARIE_nom] & " " & [SALARIE_prenom]
FROM (T_STATUT_EMPLOI INNER JOIN T_SALARIE_EMPLOI ON T_STATUT_EMPLOI.STATUT_EMPLOI_id = T_SALARIE_EMPLOI.SALARIE_EMPLOI_statut_id) LEFT JOIN R_Select_Salarie ON T_SALARIE_EMPLOI.SALARIE_EMPLOI_salarie_nni = R_Select_Salarie.SALARIE_NNI
WHERE (((T_STATUT_EMPLOI.STATUT_EMPLOI_statut) Like "*validé*") AND ((T_SALARIE_EMPLOI.SALARIE_EMPLOI_Entreprise) Like "*RTE*"));
if I run the sql query on it's own, it gives me the results I want but when trying to see this result in the final table (result table of my query) I got the blank drop-down list.
here is the result I get from executing the query alone :
So I think it's working.
Thank you in advance for reading my explanation and for your comments
I think that everything was fine, and that it was just a bug. After linking my query to a form I started seing the data in the drop-down list in both the form and query.
But I still Have one small issue which is :
Not being able to modify or choose from my drop-down List.
What I did
I created my form using Forms Assistant in access and then I chosed as data source my query. But I can't modify my form or anything could please suggest something to me.
Thank you !

How to select field based from combobox in MS Access

I want a user to be able to choose the field they select from a table through the use of a combo box in an MS Access form. My combo box contains a list of all the field names in the table, and when the user selects one I want that field to be queried. Currently, the general syntax of my code looks like this but doesn't return any values when I run it.
SELECT FORMS![formName]!cboName
FROM tblName;
The form is working fine as far as I can tell so I'm pretty sure the issue is with my SQL but I can't figure out where. Any help is appreciated.

Bizagi create dynamic combobox

Guys!
I'm working on a project with Bizagi Suite - Version 11.1. I'm new to it and I will really appreciate your help, because I'm having a hard time creating a dynamic combobox control.
So my case is the following:
Data Model: 3 master tables: Program, Order and Order-Program (m-m relationship). In table Program users fill out year, positions and amounts for each position. In table Order, they fill out info about the order and they have to specify from which program they want to take the money out for the order. The Program itself has a lot of records with different positions and amount. And I want when the users fill out the order to select the year, the position and the amount they want to take out of the program. So I need to have a dynamic combobox for the field 'position' which loads when user select year.
In other words I need to load combobox with filtered records of master table.
Do you have any ideas how I can do that?
Thank you in advance!
Best regards,
A.Mincheva
You must define your combobox with the full content of the master table.
Then ,you can define a Filter expression to dynamically filter the combobox content.
In the filter expression, you need to retreive the value of selected Year with XPath and use this value to filter the records.
In the form designer, you go to "Actions & Validations" to define the following action :
When "Year" changes <=The display name of the input field
Then Refresh "Program" <=The display name of your dynamic combobox

Limit PivotTable Filter based on another filter

I have a pivot table with multiple filters, such as:
Site: select one of the sites
Supervisor: shows all supervisors, regardless of site
Currently, the Supervisor filter shows all the available options from the data set. I want it to only display the supervisor names that match the selected site. I'm trying to put together an automated solution that will update as users select the options they need within the filters (to see their site and individual teams, for example). I'm trying to automate this, so it will always be current as supervisors are added/removed from the data set.
I'm pretty sure automating this is a VBA issue, but I'm pretty new to using VBA, so I'm not sure where to start.
Seeing as I'm new and do not have enough rep to comment I will just give you an answer and if it's not what you're looking for I will remove it.
I don't believe this is a VBA issue. In the pivot table Field List you will want to set Supervisor to be filtered by clicking the little downward arrow beside the field name within the "Choose fields to add to report" box. That way when you select a site you can then filter out any of the supervisors that don't belong there.

Access 2007 - drop down box in a Report

I need to create a drop-down box so that an employee can select a pre-set reason in the "RE:" field of a Report. There are only two selections that need to be in the box: "personal events" and "lack of adequate notice".
The report itself is already made and there are a number of fields that link back to the database - name, address, specific dates, etc that are already in the report. I've figured out how to make the drop-down box using the combo box function in a form but is there any way I can merge the combo box into the report?
I'm a beginner, by the way so I'm still figuring things out.
Currently your report sits on a query (query get relevant data from the table)
Steps to follow:-
Change the table by adding a column with the two options you just
mentioned above
Add combobox to Form with items as the two options
Adjust your query to use these options as a criteria to change
results returned by the query
Show the results in the report as you are showing right now.
If you have a code already, please post that snippet. So we can help you accordingly.
Some reference for you to get ideas
BUT I HAVE A DOUBT, ARE YOU TRYING TO SAY YOU WANT TO SWTICH BETWEEN TWO REPORTS BASED ON THE USER CHOICE SELECTED IN COMBOBOX?