Oracle Apex- Format mask in USD format - oracle-apex

I want to format mask a column into USD format.
The number would be saved in number format only, just display should be with a dollar.
The format mask i use in attributes, that come in options :for example, $5234.34 does not add the dollar sign.
How can this be achieved?

This works perfectly for me. I created a from on EMP and changed the format mask for salary to FML999G999G999G999G990D00 using the following steps:
Click on the menu next to "Format Mask" which shows the popup below:
Select the first value which returns format mask FML999G999G999G999G990D00
Value in the form looks like this:
This format is determined by the "Application Primary Language". For me that is set to "English (United States) en-us". If I change that to another language, the $ is replaced by the currency symbol of the selected language. This is set in Shared Components > Application Definition Attributes > Globalization.
You can override this value by manually setting it in an application process (Process point "On Load: Before Header") with source:
execute immediate q'!alter session set nls_currency='$'!';

Check this plugin:
https://github.com/grlicaa/AutoNumeric
Formats the number as the user types in the page item and sends the value in number format to the server

Related

Split attribute labels with delimiter for processing

I opened a csv file in Weka 3.8 and selected an attribute/column (picture below). The labels are delimited by a pipe character. There should be 23 distinct labels but Weka displays 914. Thus, Weka cannot visualize for too many values. Action is one label, adventure is another one, etc. Basically there can be more than one label per row.
For processing (eg. classification), How can separate those values so Weka can read them?
This question is similar to this. But the question asks about the date attribute (eg. "dd-MM-yyyy HH:mm"). This asks about a character-separated value (eg. "Action|Adventure|Drama")
Edit:
The data is taken from kaggle.
Ah, I had run into this problem too.
Firstly, ensure that the Genres attribute is recognised as a String type. If you are only using the GUI, go to Open File... and open the file (I presume it's a .dat file. If you've renamed it to .csv hit the check box which says "Invoke options dialog").
In the Generic Object Editor window, enter the index of the Genres attribute (here it's last).
Doing that will cause the attribute to look like this in the GUI.
Now choose the filter called StringToWordVector (weka.filters.unsupervised.attribute.StringToWordVector). Now under the Editor window, find the Tokenizer entry, click on its field, and under delimeters remove the defaults and add the pipe character. You may optionally edit the attribute prefix field as well.
Hit apply and find the required genres added in as numeric attributes, set to 0 for cases where the genre was not present in the original string, 1 otherwise.
StringToWordVector is a pretty useful filter, and there's much more to it in the docs: http://weka.sourceforge.net/doc.dev/weka/filters/unsupervised/attribute/StringToWordVector.html.

Universe/U2/Pick ICONV()

In U2/Universe/Pick, there is a function ICONV("11/11/15","D") to convert an external date to an internal date but this will work in USA or with the date format mm/dd/yyyy only. How can I use this function for UK date format (dd/mm/yyyy) ?
ICONV("11/12/15","D4/DMY")
output: 17512
According to the UniVerse BASIC Commands Reference documentation, you can also use the following to control the date format:
You can set the default date format with the DATE.FORMAT command. A
system-wide default date format can be set in the msg.text file of the
UV account directory. Date conversions specified in file dictionaries
or in the ICONV function or the OCONV function use the default date
format except where they specifically override it. When NLS locales
are enabled, the locale overrides any value set in the msg.text file.
NLS sets the local date format required so if it is enabled the following does not apply.
The question is, do you want all dates in dd/mm/yyyy format or just for this process. Assuming all dates should be, then setting DATE.FORMAT ON at login will do this. Otherwise you can set it temporarily just for the process and afterwards set it back using DATE.FORMAT OFF.

Informatica Persistent Data Masking

I am working on Informatica Persistent Data Masking tool and I have to mask repeatable values in different tables and schemas with same masking pattern.
For example: if some name say sonal is repeating in different tables, I want to mask sonal in all tables with same masked value.
How can I do that? or which masking should I use? I have tried Key masking and similar value columns.
Thanks.
Here are the steps....
Create individual Connections (under 'Administrator' tab of the product) for Databases which contain the Tables that have data 'Sonal'.
Now, navigate to Projects tab and create a new Project and Import the Metadata from all the Connections you have created (make sure you pick required tables from each of those Connection)
Under 'Policies' page, create a "New Masking Rule" by choosing Masking Type as 'Substitution' (from 'Standard' drop-menu). Click on 'Next'.
In the 2nd step of this Rule creation wizard, select 'Repeatable' and enter any value between 1 & 1000 as 'Seed'
Select any valid Dictionary (can be a Flatfile dic or a Relational dic - but this should've already been created/added under 'Administrator -> Dictionaries' page) that has Serial Number & some valid Names which can be used to mask the Names in original/Source tables.
Pick correct columns for 'Masked Value' & 'Serial Number Column'fields. And save the Rule.
Add this Rule to your Project (which has Meatadata of all the required Tables) under "Project -> Overview -> Policies" page
Navigate to 'Define -> Data Masking' page, select all the required columns (in this example, whichever columns contain the name 'Sonal') and mark them as Similar value columns.
Assign the Substitution Masking Rule (which was created with 'Repeatable' option in Step #6) to a Column. Save the changes.
Create a Plan by navigating to 'Execute' page. Make sure you select the correct Masking Rule. After saving this Plan, select 'Generate and Execute' from Actions menu.
Once this Plan is executed successfully, you can see the Masked values (consistent value for all the occurrences of 'Sonal') in the Target Database(s).

Modify Dynamic Field Display Length in OTRS

I've added a dropdown field to a customer's ticket in OTRS called Branch. It allows users to select their branch, identified by a number and a name. For example, my branch is 901 - Support Group. When I display this field in the ticket zoom view on the Agent side, it gets truncated to 901 - Support[...]. I can see the entire value of the field as a hover text when I hold my mouse over it, but I was hoping there would be a setting to expand the length of the field or to tell OTRS to display it as multiline text. Is there a configuration option in OTRS to change the display length, or does anyone know where I would need to modify the code to change the length myself?
With some help from crythias over at the OtterHub forums, I was able to find the right setting.
Navigate to the SysConfig
Filter by the Ticket config group (dropdown on left)
Locate and select Frontend::Agent
Locate Ticket::Frontend::DynamicFieldsZoomMaxSizeSidebar
By default this is set to 18 characters. I reset it to 140 (Twitter rules), and it automatically wrapped the text for me.

Google motion chart initial state - set time unit for slider

I am working with a Google Motion Chart with has a play button and slider at the bottom that animates the chart. I would like to set the time unit/steps used by the slider. The default seems to be a day ("D").
My drawChart method sets the initial state and I tried setting the timeUnit to "M" - "duration":{"multiplier":1,"timeUnit":"M"} - for month but this did not change anything. I could not find any documentation on possible settings for the initial state variables.
Below is my method which sets the state:
function drawChart(data) {
var evalObj = eval("(" + data + ")");
var dataTbl = new google.visualization.DataTable(evalObj);
var motionchart = new google.visualization.MotionChart(document.getElementById('chart'));
var options = {};
options['state'] =
'{"iconKeySettings":[],"stateVersion":3,"time":"notime","xAxisOption":"_NOTHING","playDuration":15,
"iconType":"BUBBLE","sizeOption":"_UNISIZE","xZoomedDataMin":null,
"xZoomedIn":false, "duration":{"multiplier":1,"timeUnit":"M"},"yZoomedDataMin":null,"xLambda":1,"colorOption":"_UNIQUE_COLOR",
"nonSelectedAlpha":0.4,"dimensions":{"iconDimensions": []},"yZoomedIn":false,"yAxisOption":"_NOTHING","yLambda":1,"yZoomedDataMax":null,
"showTrails":false,"xZoomedDataMax":null};';
options['width'] = 800;
options['height'] = 400;
motionchart.draw(dataTbl, options);
}
Is "M" the setting for month? How do I change the slider to use months instead of days for its steps?
The documentation says:
The second column must contain time values. Time can be expressed in any of the following formats:
Year - Column type: 'number'. Example: 2008.
Month, day and year - Column type: 'date'; values should be javascript Date instances.
Week number- Column type: 'string'; values should use the pattern YYYYWww, which conforms to ISO 8601. Example: '2008W03'.
Quarter - Column type: 'string'; the values should have the pattern YYYYQq, which conforms to ISO 8601. Example: '2008Q3'.
Reading another thread, it looks like Google is throwing this in the trash and are not going to be enhancing the time units.
Try this.
You can specify that the motion chart start with a specific state: that is, a set of selected entities and view customizations. To do this, you'll need to first create and display the chart, then make any state changes that you want the chart to show (select values, change settings, etc), then export these settings as a string, and finally use this string in your code, assigning it to the "state" option. The next two sections describe how to export and then use the state code.
Open a working chart and set the settings that you'd like to capture. Settings you can specify include opacity levels, zooming, and log vs linear scaling.
Open the Settings panel by clicking the wrench symbol in the lower right corner of the chart.
Click the Advanced link in the lower left corner to add the Advanced panel to the set.
Expand the Advanced panel and copy the contents of the State text box to your clipboard. (Note: instead of using the menu, described in steps 2—4, you could insert a button on your page that calls getState() and displays the current state in a message box.)
Assign the state string that you copied in the previous step to the "state" options parameter in your code, as shown here. When passed into the draw() method, the chart will be initialized to the state specified on startup.