Tabular Forms Column merging Oracle Apex 5 - oracle-apex

Does anybody know how to merge two columns of tabular form into a single column?
This is an example:

You can do that by applying html codes in your query.
Try this in your query
SELECT attendance,
member_id,
name,
saving,
'<input class=''u-TF-item u-TF-item--text '' style=''text-align:center;'' name=''repayment'' value='||repayment||'></input>'||'<br>'||
'<input class=''u-TF-item u-TF-item--text '' style=''text-align:center;'' name=''profit'' value='||profit||'></input>' repayment,
FROM
your_table
WHERE
...
assuming that their header is the same as their column name;
class was just copied from the other column to match their appearance.

Related

Power BI CosmosDB Flattening table

I'm following this tutorial exactly:
https://learn.microsoft.com/en-us/azure/cosmos-db/powerbi-visualize
But when I do step 2 of the "Flattening and transforming JSON documents" section I do not see the field names for the dataset. I only see:
$t
$v
id
_self
_etag
_rid
_attachments
_ts
I have tried clicking display all, but it's still the same set of fields.

How to filter selective data from a postgres using PDI components?

For example : I have a column named description, in this column there are millions of records. I just want to filter records only with "a=x" (where x can be any value) using pentaho?.This pattern can be at any position in the column
Assuming that in your description column you always have a value after the pattern 'a=' you could just do the filtering in PostgreSQL using LIKE
SELECT
description
FROM
your_table
WHERE
description LIKE '%a=%'
Then you just put this query inside a Table Input step in your transformation.

classic report and derived columns

I have a classic report 2 columns are coming from the table and the 3rd column is a derived column.
I want to compute the values of the 3rd column based on the value of the 2nd column like if the 2nd column value is 1 then I want to put '-' in the 3rd column if it is >1 then in the 3rd column I want to put 'More than one dates'
And I want to have filters in the 3rd column header with the values that I put, I this case '-' and 'More than one dates'
And when I select the filters I want the report to be filtered accordingly.
I have a put a screen shot of the report.
Please can anyone let me know how to accomplish this.
Any help will be more than welcome
Apex 5.1 and Firefox
Snap Shot of the Report
Your SELECT-Statement should look something like this:
select ULA_ORDER_NUMBER,
COUNT,
CASE WHEN COUNT = 1 THEN '-' ELSE 'More than one dates' END as FILTER
from YOUR_TABLE
For the filter just "double click" on the COUNT column header.
This is what it looks like:
Hope this helps you.

APEX dynamic tabular form field types

We are populating a subregion of a page with an Iframe (call to another page) with data for a questionnaire.
We have PAGE ITEM variables (:P37_... populated by query) that contain table values for P37_QUESTION_DESCRIPTION and P37_RESPONSE_TYPE.
The sub page used in the region (:P28_...) assigns report attributes for each column... where We populated the question text in the P28_QUESTION_DESC and a Y/N Select List defined list of values in the P28_RESPONSE_DESC_DISPLAY column. This works fine.
Now, the P37_RESPONSE_TYPE can more than just this Y/N Select List. It could be TEXTAREA, PICKLIST, DATE...
How can we define the :P28_RESPONSE_DESC_DISPLAY column dynamically to be any number of user input field types (based on the value in :P37_REPSONSE_TYPE?)
This was solved by using a non-tabular form report generated by query using apex.item functions. But is has left me with another problem. Here's the query:
select
apex_item.hidden(31,CASE_QUEST_DTL_ID) CASE_QUEST_DTL_ID,
apex_item.hidden(32,CASE_MGMT_BASE_ID) CASE_MGMT_BASE_ID,
apex_item.display_and_save(33,to_number(question_seq_no)) QUESTION_SEQ_NO,
apex_item.display_and_save(34,question_desc) QUESTION_DESC,
case when response_type = 'PICKLIST-YESNO' then apex_item.select_list_from_lov(35,response_desc,'YES_NO_SELECTLIST',NULL,'NO')
when response_type = 'TEXTFIELD' then apex_item.text(35,response_desc)
when response_type = 'TEXTAREA' then apex_item.textarea(35,response_desc,5,40)
when response_type = 'DATEPICKER' then APEX_ITEM.DATE_POPUP2(35,to_date(response_desc,'dd-mon-yyyy'),'dd-mon-yyyy')
end RESPONSE_DESC
from V_CASE_QUEST_LINK
where question_set_code like 'COB_Q%'
and case_mgmt_base_id = :P37_CASE_MGMT_BASE_ID
My problem is now grouping the questions by question_set_code. Because GROUP BY is evaluated after the select, it cannot simply be tacked on to the end of the query. I'm not sure that using a nested select will work here because of the apex.item calls. Anyone have a suggestion on how I can group these questions by the column?

Wildcard search on Date fields

I use HSQLDB2.0 and JPA2.0 for my current project and have few date columns in DB.
I would like to run wildcard queries on the date columns. How could I do that?
Ex : If my DB contains two rows with date values as : 10-01-2011 and 15-02-2011
and my search criteria will be "%10-01%", then result should be 10-01-2011.
Else if search criteria is "%2011%" then both rows need to be fetched with the select query.
Thanks in advance,
Satya
You can define an autogenerated column of type VARCHAR containing a copy of the date. You can then perform queries with both LIKE predicates and REGEXP_MATCHES() function. An example of the column definition is below:
DATEGEN VARCHAR(10) GENERATED ALWAYS AS (CAST(DATECOL AS VARCHAR(10))
Note the string representation of DATE is in the form '2011-02-26' and your query strings should follow this pattern.
This can be achieved in this format :
select date_birth from member where to_char(date_birth,'MM-yyyy') like '%02-2011%'
select date_birth from member where to_char(date_birth,'MM-dd') like '%02-15%'
select date_birth from member where to_char(date_birth,'dd-yyyy') like '%30-2011%'
Regards,
Satya