Oracle APEX: how to modify the display text in the displayed column selector in an interactive report instead of HTML - oracle-apex

Whan I created a column in an interactive report that display a checkbox.
The header of that column is also a HTML code
But when I go in the "interative report "Action" menu and choose the column I what to display, the escaped HTML code is displayed.
There's a way to display another string instead of the HTML code ?

Related

How do I disable the hyperlink in Power BI Text Boxes?

If I add a Measure to a Text Box that simply calls the TODAY() function, the date becomes a hyperlink on the Report Tab.
How do I disable this hyperlink? I simply want to show today's date.
The steps that I used to add a Measure to the text box are below.
In the Data Page, create a Measure named Report Date = TODAY().
On the Visuals Page, click Text box in the Insert group of the Home tab of the ribbon bar.
Click + Value
In the text box labeled How would you calculate this value, type Report Date.
Click Save.
The text box now shows todays date. However, it is also a hyperlink with nowhere to go.
The only alternative is a Card or a Table.
I was able to produce a nice business card by using a calculated column like:
CardText = [clientdescription] & UNICHAR(10) & [ServiceContactName] & UNICHAR(10) & [ServiceAddress1] & UNICHAR(10) & [ServiceCity] & ", " & [ServiceState] & " " & [ServiceZipCode]
and set the Text box to CardText.
The UNICHAR(10) function embeds a line break in the CardText string.
This is nice because you can left-align the text (which you cannot do with a Card Visual).
This also updates when aligned with a Slicer.
However, the Text box shows the CardText as a hyperlink. There is no hyperlink address, and therefore, nothing to remove.
A text box that simply allows us to set text, alignment and all font properties (color, weight, font, size, italics, underline, bold, etc.) would be a godsend.
When the report is published, there will be no hyperlink behaviour on the date in the text box. The hyperlink behaviour is only present in Power BI desktop. Clicking on the hyperlink will open up the settings for the value, so you can edit them.
And you can totally control the font, size, color, etc of that text. Just select the date as it shows in the text box and use the formatting tools. Like with Constantia font in 16 pt and pink.
If you don't want the hyperlink behaviour, consider using the measure in the Title of the text box instead of the body. You can also add the measure to the title of any other visual. To do that, you first need a measure that returns text, since the Title of a visual cannot show dates.
ReportDateText = format(TODAY(),"dddd, dd MMM YYYY")
Now you can edit the title property of a visual.
Turn the title on
Click the formula button to open the dialog
Select the measure with the text version of the date
The result shows in the visual's title.

How get display value of checkbox in a checkbox group?

I am using APEX 21.1. I have a checkbox group whose list of values is retrieved using a query...
select disease, id from history;
The query returns many checkboxes. I have another textarea item. I need to get the display value for any checkbox whenever it's checked and set item HISTORY to that value. How to do so?
Describing a how-to would be so much easier if you had provided some example page item names and example data. So, lets call your checkbox group P10_CHECKBOX and your textarea P10_TEXT.
Usually, your checkbox group will save the item ids as a colon seperated list, like this: 3:4:5
To display the corresponding display values, make a dynamic action on change on your item P10_CHECKBOX.
Then, use an action of type Execute PL/SQL Code to fetch the display values of your items.
The code could look like this:
select listagg(disease,chr(10)) within group (order by disease) into :P10_TEXT
from history h
join table(apex_string.split_numbers(:P10_CHECKBOX,':')) t on (h.id = t.column_value);
apex_string.split_numbers will convert your colon list into an actual "table" with the column column_value you can use in the join clause. listagg will do the actual concatenation and will work up to a couple thousand characters. chr(10) is an ordinary line break and will have your items be shown line by line, but any other seperator will do.
Last step is to set up P10_CHECKBOX in your Items to submit and P10_TEXT in your Items to return.
Now, whenever you click a checkbox, the textarea will be updated immediately.

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.

Refresh Apex 5.0 chart results with different dynamic actions on same SQL query

I have created a bar chart on APEX 5.0 where my query looks like below:
select col1 as label,col2 as value from table1 where :P3_NEW_1 = col3;
here: P3_NEW_1 the page item I have created of type "Select List".
The list of values in "Select List" page item are pre-populated in the dropdown using the "Shared component" type I have created and so far this worked fine and I am able to display the results of above query by passing the value through the page item select list.
Now I need to add 2 data pickers on the same Apex page such that I should now be able to filter the results using date picker through dynamic action.
I know that using an additional button I can create a dynamic action but my problem is how do I modify the above query such that following should happen.
During the page load, once I select a particular value from the "Select List", it should display records based on the value selected from dropdown
This I already achieved using above sql query for the bar chart.
Once the bar char is displayed, I should next be able to filter and display the results using date ranges through date pickers.
Here my problem is my bar chart query is same but I need to now pass the start_date and end_date to the same above sql query which but I am not sure how to achieve this. If I add a button for dynamic action I need to select the report region which is the "bar chart" region and here my query needs modification.
Once the bar chart display the results, at the next step how do I filter the results by having the date filters with dynamic action on the same region where bar chart was displayed. How to achieve this?
You can change the query to something like this:
SELECT COL1 AS LABEL,
COL2 AS VALUE
FROM TABLE1
WHERE :P3_NEW_1 = COL3
AND (:P3_START_DATE IS NULL
OR TO_DATE(TIME_STAMP,'YYYY-MM-DD-HH24:MI:SS') BETWEEN :P3_START_DATE AND NVL(:P3_END_DATE,SYSDATE));
Where :P3_Start_date and :P3_End_date are the Start and End date pickers and TIME_STAMP is your column where you store the date.
After modifying the query you can simply add a button where at Behavior>Action select Submit Page.
This way when you click the button, the page will be submitted and chart refreshed.
If you want to take your chart to the next level you can do a partial refresh on it. Here is a short video tutorial of partial refresh on a report but you can apply the same login on your chart.

django-tables2: perform an action on click of a row

How to perform some desired action (like saving some values to a session variable that i can use for loading the next page) when a row is clicked in a table created using django-tables2
I am using to django-tables2 to display some data that is coming from DB
In other words I want my table rows to be clickable