How can I search for primary key in APEX Interactive grid search page field? - oracle-apex

How can I search by primary key value in APEX interactive grid ,
by default the search page can search all text columns only , but I need to search by primary key also for example ORDER_ID .
I checked the page and region attributes but I didn't find the way to change the query and search for primary key in the query .

One option is to add another column to the query.
It seems that the primary key column is a number. Apply TO_CHAR function to it and it'll appear as text column and will thus be searchable.
Something like this:
select empno, --> primary key
to_char(empno) as text_empno, --> TO_CHAR applied to the PK column
ename
from emp
How does it look like?

Related

Oracle APEX 21.2.0 display image Primary Key

I want to display image in report column. My table has composite primary key: ID and DATE.
When I add these columns in BLOB attributes as Primary Key Column 1 and Primary Key Column 2 report can not find data because of DATE column. Is it a problem in date format, or something else?
I'd suggest you to use only one column as a primary key column (a sequence or - if your database version supports it - an identity column).
Combination of [ID, DATE] you currently have can then be set to unique key (set both columns NOT NULL to "mimic" what primary key would do).
Why? Although your data model probably is just fine, certain Apex functionalities "suffer" from such things and prefer having a single-column primary keys.

Displaying image in an Interactive Report

I am using APEX 21.1. I am building a clinic management system. I have an interactive report based on a join between two tables SELECT e.id examination_id,E.DIAGNOSIS,dbms_lob.getlength(a.img) img, a.id,attachment_id FROM examination e JOIN examination_attachment a ON A.EXAMINATION_ID = e.id. The examination could have many attachments. This is the result of the query.
I changed IMG column's type to Display Image. When it asks for BLOB ATTRIBUTES, I set table name to examination_attachment. That's the table that have the images. And I enter the primary key as the table's PK(id). The page displays error No data found. The SQL query returns that id duplicated when there is more than one row in the examination_attachment table. I think that's the reason behind the error but not sure. I created a view with the same select statement without the dbms_lob.... part. Just selected the IMG column. And in BLOB attributes, I set the table to the view name, and the primary key as the attachment_id because it's the column that's not duplicated. And it worked. But I need to get it to work without views and I need to know if the cause of the error is right?

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.

Sitecore Name Lookup Value List - Multilpe Values per Key

Specifically in sitecore, the column configuration is defined using a Name Lookup Value List, and I want to add a colour drop down along side it so it can be applied specifically to each column as set up by the configuration. This means for each key (column ID) I want the column config as a drop down and the colour as a drop down.
If you don't want to create a custom field that will allow to do this, you should:
Create Column Specification template
Add 2 fields to this template: Column and Colour
Create items using this new template for every column you need
Instead of selecting columns in your Name Lookup Value List, select Column Specification items.

Formatting a portal in FileMaker 13 to show related text only and not keys

I am using FileMaker Pro 13. I need to add Portal to show data from related table.
Some fields which I wanna add to Portal are "Foreign keys" from that related table that are linked-related to third table.
Results I am getting in Portal from those fields are numbers, but I need data (text) from that third table that is related to that "Foreign key".
Is it possible to create portal that shows text related to that foreign key, and if it is, how to achieve that?
Thanks a lot!
Example schema is on link https://www.lucidchart.com/invitations/accept/e45dfdfd-185d-46c8-ad9e-e8e8dc270ee7
In general words, I want to add Portal on layout based on Table3, so I can view related data from Table2, and it would have fields tbl2item, TBL1_foreign key (from where I pull data from Table 1 when I enter data in Table 2, using pop up menu). And in Portal data I need TBL1_foreign key to be represented as text from related table instead of auto-numbers.
Assuming the relationship:
Table 1 --> Table 2 --> Table 3
You are in the layout based on Table 1. Make sure there is relationship to Table 3 and it is in the same group (TOG) in Manage Databases. Just place the field with text from the Table 3 on your portal row and it should work.
Make sure you select the correct relationship for Table 3. In drop-down list it should be in "Related" group. Should look like "Table 3::myFiled" on the layout, with the name the same as the name of your table instance (TO) from "Manage database" which could be different from your base table name
The other option would be to use value list.
I do not see your file, so if it does not work for you, post more details about your setup.