Oracle APEX - help text for the radio group - oracle-apex

I need to add help text to the radio group items.
I tried using
SELECT product_ID as r,
('<span style="cursor:help" title="' || product_description || '">'|| product_title || '</span>') d
FROM Products
That did not work. I tried to display product_description some other way but nothing I found works. Is it possible?

Related

Navigation button based on a PowerApps dropdown value

I have been trying to set mandatory dropdowns to be selected in order to go to the next screen.
Next screen is called End
Dropdown is called type_4
This is the code that I used but it doesn't seem to go through:
If(
IsBlank(type_4.Selected.Value),
Notify("Fill all the fields to continue", NotificationType.Error),
Navigate(End,ScreenTransition.Cover) )
This issue is specific to dropdown inputs. If it was a text field all I do is replacing Selected.Value by Text and it works fine.
Dropdowns are my only problem so far.
EDIT: The default value of the dropdowns is Select your answer (first choice of the dropdown).
If the default option for your dropdown is 'Select your answer', then you can use an expression similar to the one below:
If(
type_4.Selected.Value = "Select your answer",
Notify("Fill all the fields to continue", NotificationType.Error),
Navigate(End,ScreenTransition.Cover) )

Oracle Apex IG force user to have filter on column

I need to force user to have filter on column with date. Dataset is rly big and it must-have. I know how to force user to have any filter. Just add to "Where":
:apex$f1 is not null
But I need to find how to force user to have filter on specific column
Like i wrote in comment this is solution (I couldn't find better one)
In 'Where Clause' I added this
EXISTS (SELECT /*+ NO_UNNEST */ F.*, R.*, C.* FROM apex_appl_page_ig_rpt_filters F, APEX_APPL_PAGE_IG_RPTS R, APEX_APPL_PAGE_IG_COLUMNS C
WHERE 1=1
AND F.report_id = R.report_id AND C.column_id = F.column_id
AND F.APPLICATION_ID = 100 AND F.PAGE_ID = 100
AND C.NAME = 'MY_COLUMN_NAME'
AND C.REGION_NAME = 'MY_REGION_NAME'
AND R.SESSION_ID = :APP_SESSION)
This checks setting of IG in apex objects. In addition you just need to wrote in Messages "When No Data Found" something about that column that is required, just to inform users.

How to include Tree and Master Detail in same page

I am new to Oracle Apex. I am trying to create a 3 column page with 3 regions for tree structure, master detail screen and customized buttons respectively. I was able to create Tree in one page and Master-Detail in different page. When I bring them into one page, tree is not displayed.
When I click on any node of tree I am redirected to master-detail page and data is shown. But I need to display Master-Detail in same page where my tree is present but in a new region instead of redirecting to new page.
SQL Query of tree:
select case
when connect_by_isleaf = 1 then
0
when level = 1 then
1
else
-1
end as status
,level
,name as title
,null as icon
,id as value
,null as tooltip
,'f?p='||:APP_ID||':'||4||':'||:APP_SESSION as link
from (
select to_char(d.DEPARTMENT_ID) id
,to_char(null) parent_id
,d.DEPARTMENT_NAME name
from DEPARTMENTS d
union all
select t.DEPARTMENT_ID || '_' || task_configuration_id
,to_char(t.DEPARTMENT_ID)
,t.TASK_NAME
from TASK_CONFIGURATION t
)
start with parent_id is null
connect by parent_id = prior id
The same query works when creating a tree as new page, but doesn't work when included in Master-Detail page(made 'NULL' as Link in select list). Am I missing any configuration! please help..
Also, any help on creating the 3rd column for including custom buttons region will be a great help.
the problem might be the branch or leave
the answer = is leaf 5 or more
= is branch 5 or more
this the answer might be
when connect_by_isleaf = 5 then
when connect_by_isbranch = 5 then
that might conclude my opininion or suggestion

Oracle Apex - How Show Image in a Dynamic List

I have created dynamic list for sub-menu page,now i want to show image for each list entry
A nice feature is to use Apex Font Awesome icons.
Here's an example of a dynamic list query, based on Scott's DEPT table:
select
null lvl,
dname,
'#' target,
null is_current,
case when deptno = 10 then 'fa-thumbs-o-up'
when deptno = 20 then 'fa-thumbs-o-down'
end icon
from dept
order by deptno
When you add the list to the page (as a region), navigate to its "Attributes" and modify template options by setting the "Display icons" property to "For all items".
Once you run the page, you'll see a thumb up icon by department 10 and thumb down for department 20.
List of all available icons is here.
The answer is in Example 1 in the SQL page of the Create List wizard:
Example 1:
SELECT null,
ENAME label,
null target,
'YES' is_current,
'#APP_IMAGES#del.gif' image, -- <-- HERE
'width="20" height="20"' image_attrib,
ENAME image_alt
FROM emp
ORDER BY ename
first use query like below:
select
1 level,
dname label,
'#' target,
null is_current,
'IMAGE'||img_name image
from dept
order by deptno
with this query img_name set as class for each card. after that use this javascript code on page load:
var spns = document.getElementsByTagName("span");
for (var i = 0; i < spns.length; i++) {
if (spns[i].className.includes('-IMAGE')) {
spns[i].style.backgroundImage = "url(#IMAGE_PREFIX#"+spns[i].className.substring(5)+")";
$('.'+spns[i].className.substring(5)).css("background-size", "cover");
}
}
for this background image url should exist images on ords server.
good luck

How to only display 'Edit' link on certain rows on apex interactive grid?

I have an interactive report apex5.0 which contains several fields.
Would like to disable 'edit' pencil option link where payment_date & code is populated.
Link is to be enabled only where payment_date & code is null.
Disable the edit button for a particular row, based on a specific value in its column.
For ex. If a grid has 3 columns A,B,C and if B contains "Apple", and '01-jan-17', the edit button for that row must be disabled.
What are the different options to do this kind of functionality in apex5.0, enable & disable "EDIT" based on certain criteria?
You could also add a case statement to your report's query.
E.g.
(Case when [some logic] then
--display link
'<img src="#IMAGE_PREFIX#menu/pencil16x16.gif" alt="" />'
End) as col_link
The above example will only display a link if the case statement is met. The link will point to page 47 and we will pass the query's Id column to page 47's item P47_ID
In order to treat this new column as a link you must change the "display as text" property to "standard report column"; you can achieve this when editing the report attributes.
One way is to use JavaScript on page load:
Let's asume that first column is with ID and used to show edit link. Second column is your product name like Apple. Just disable click on this element(cell with ID) or change link, img etc.
var table = $(".a-IRR-table tbody");
table.find('tr').each(function (i, el) {
var $tds = $(this).find('td'),
productId = $tds.eq(0).text(), //first column with ID and edit link
product = $tds.eq(1).text(), //second column
Quantity = $tds.eq(2).text(); //third column
if (product == 'Apple'){
$tds.eq(0).click(false);
$tds.eq(0).replaceWith('');
}
});
Thanks to this answer for JavaScript: Loop Through Each HTML Table Column and Get the Data using jQuery
EDIT:
To hide value based on your Query use CASE. For example:
SELECT
CASE
WHEN B = 'Apple' THEN
'<img src="#IMAGE_PREFIX#edit.gif" alt="">'
ELSE ''
END edit_link,
A,B,C
FROM TABLE_NAME
Click on column edit_link and make it of type Link
Choose your target to edit page
For link text select #EDIT_LINK#
Escape special characters must be set to NO
On Report Atributes set **Link Column** to **Exclude Link Column** (you have custom link column so don't display original link)
*Check your online workspace, page 3*