Editable Fields in Interactive Grid - oracle-apex

I have a column that needs to be editable by user in interactive grid.
However, I want that user can only choose from 2 static values. Is there a way I can implement that?

Use a 'Select List' or 'Switch' for column type, instead of 'Text Field'.
Then associate the relevant List of Values, either from a static list, a SQL query, or pre-defined shared component.
Alternatively/additionally, you could have a validation on that column to check for those specific values.

You can convert column type to "Select List" or "Radio Group", and then you can define "Static Values" as "List of Values".

Related

How to create a field with a list of choices but store the index?

I'm making a Microsoft Access table where one of the fields is a list of pre-made options. When I make a SQL query on that table it returns the values of the list as strings containing the spelled out choice. I would like to assign numerical values to each element of the list so a SQL query returns a number instead. How do I do this? I know it's possible because I have an access file with such a list but I'm unable to recreate it.
An easy way to do this is to have your combo box use a query of the table as a Rowsource. This query would have the table unique ID in the first field and the field you wish to return as the second field. Then change the setting on the combo box for "Column Count" to 2. If you want to show both fields change the "Column Widths" value to 1"; 1". If you want to show only one field, change the value of one you do not want to see to 0. Now we you refer to this list in an SQL queries, it will use the ID field but show the user the string field.

Order by a field which isn't included on a matrix POWERBI

I'm trying to build a matrix on PowerBI and I want to order the data by a field which I don't want to include in the matrix. My field named "category" in the matrix must be on a especific order, and I create a numeric field to specify the order. But when I want to order by that numeric field, I can't, PowerBI only allows me to order by the field which is in the matrix.
To test it, I concatenated my numeric field with the category like this: numeric - category, and it works, but I don't want to show it like that, I want only the category field order by the numeric field.
Any suggestion? Thanks.
EDIT:
I have also tried with "Sort by column", but neither selecting the matrix nor the data source table, the button is not activated.
Also detail that "category" has 2 or more numbers in "order" column.
"Sort by column" was not activated because there were many duplicated rows in "Category" field, so I couldn't sort by "Order" because 2 or more rows share the same "category" with different "Orders". I fixed my database and now I can use the tool.

How to write a query based on the Date item, in interactive grid

I have a date field and a interactive grid. I am trying to generate the Interactive grid based on the value inputted in the date field.
I am trying to write the query as below :
select pap.effective_start_date , pap.effective_end_date
from per_all_people_f pap
where :SELECT_DATE between pap.effective_start_date and
pap.effective_end_date
Here, SELECT_DATE is the name of the Date field (datatype Date picker). I am writing a dynamic action on Change of Date field, and refreshing the interactive grid region.
But when I change the value in Date field, it doesn't return any rows.
I have done a similar change where my interactive grid was based on a dropdown. There I had to set the "page action on selection" to Submit, and it worked. But here, since it is a Date field, the "Page Action on selection" property doesn't appear on the page .
Can somebody please suggest, how can I achieve this.
You need to explicitly convert your bind variables, which are treated as strings, to dates.
to_date(:SELECT_DATE)
The format mask will come from the application properties, or you can be explicit with that, too.

Django database query to select all values in a column

Basicly I just want to say "give me all the values from column Y" and not "select all values and filter for Y based on primary key Z"
The word "column" is only mentioned one time on the Django documentation page and the "primary key" and "row" options are very clearly explained in my eyes.
Now I wonder, how do I do this? :)
If I understand well, you want to query values for only a column, I think this is what you need:
MyModel.objects.values('column_name')
Or if you want to get a list of values:
MyModel.objects.values_list('column_name', flat=True)
You can apply any filter before selecting values:
MyModel.objects.filter(**criteria**).values_list('column_name', flat=True)

Fail to query a list corresponding another value in ADD ROW action

Please Help...
I am using Oracle Apex.
I created the FORM page with Master Details form, it has CW_ORDER and CW_SALESLINE table. There also is a CW_INVENTORY table.
When user press "Add Row" button, there will show two list boxes for choosing which 'TYPE' as Product type" and 'INV_ID' as Product Description".
TYPE as Product Type is configured "Select List(static LOV)"
with List of Value (STATIC:Hardware;Hardware,Software;Software)
User can choose 'Hardware' or 'Software' only.
INV_ID as Product Description is configured "Select List(query based LOV)
with List of Value (select description, inv_id from cw_inventory where cw_inventory.type = :type)
I want that when user chooses Product Type value such as 'Hardware' and then Product Description can list only the type of Hardware items for choosing instead of all items are listed.
In CW_Inventoty has a 'TYPE' column, its value is Hardware or Software.
I think the (select description, inv_id from cw_inventory where cw_inventory.type = :type) something wrong.
Please advise. Thank you so much .....
To achieve your above requirement,
you want to use cascading select list concept here in tabular form.
refer Cascading select list on tabular form for more details.