OBIEE 11g: Pass string contained special character through dashboard prompt - dashboard

Is there anyway to pass a string that contained special character (ex: ') into a presentation variable through dashboard prompt?

You can create a prompt for presentation variable.
In Create prompt screen , create a variable prompt and select 'prompt for presentation variable'. It will accept special characters as well for setting presentation variable value.
Create variable prompt screen shot
dashboard screenshot
Another way is to use GO url, where you can pass the value as a parameter in the url and is used to set a prompt. In prompt you can set a presentation variable using this parameter value.
Refer below doc to learn more.
https: //docs.oracle.com/cd/E14571_01/bi.1111/e16364/apiwebintegrate.htm#BIEIT364

Related

visit a Full URL with parameter value

I'm trying to make a bash script to send a GET requests
also I'm trying to provide a URL access after changing some parameter value
problem:
when I hover over the link it will only underline URL without parameters values(check the following screen)
when I entered the URL it will redirect me to:
http://testphp.vulnweb.com/artists.php?artist=
I'm wondering if there is a solution for this case or not
Thank you in advance
Note that it's the terminal and not your script that decides what's considered part of a URL for the purpose of selecting or clicking.
But what I can suggest is to Use the URL encoding for those special characters instead of explicit special characters:
%27 = Single Quote **'**
%3C = Less than **<**
%3E = More than **>**
For example
URL=http://testphp.vulnweb.com/artists.php?artist=
PARTIAL_URL=$URL%3Cscript%3E
That will be shown http://testphp.vulnweb.com/artists.php?artist=<script>
Maybe that would do the trick

Why is SET DEFINE OFF not working for the colon (:) character?

I have a script I'm trying to run via sqlplus. At the top of the script, I have "SET DEFINE OFF" set. However, when I run it, I'm receiving this error:
SP2-0552: Bind variable "CHANDAWALA" not declared.
I believe this is happening because I have a couple update statements that include colons within a string like this:
UPDATE ADDRESS SET ADDRESS_STREET_LINE1 = 'Moh: Chandawala'...
UPDATE ADDRESS SET ADDRESS_STREET_LINE1 = 'Moh:chandawala'...
So it's treating them like bind variables. I was under the impression that SET DEFINE OFF would make it treat anything within a quoted string as characters and not interpret anything within, including perceived bind variables.
This obviously isn't the case - So in this situation, what am I supposed to do? Do I have to escape these manually?
Thanks.
EDIT - The posted question at When or Why to use a "SET DEFINE OFF" in Oracle Database doesn't help me since that person is trying to escape ampersands for variable substitution, and not colons as bind variables. I'm looking for a way to tell the client to ignore anything (including colons) in quoted strings.
EDIT - Okay, so it sounds like Oracle shouldn't be interpreting that as a bind variable within quotes. So now the question is, why is it doing that?
Set Define Off is a SQLPlus command and it prevents SQLPlus from treating & as a special character. & is also specific to SQLPlus and have no meaning outside it.
When define is on, the SQLPlus replaces the substitution variables with actual values and then pass it to the Oracle SQL engine.
On the other hand, : are real bind variable that only Oracle SQL engine recognises and look for a to-be-bound value. The : are not recognized as bind meta character by SQLPlus and is passed as such to the SQL engine.
I cannot duplicate your issue. I created a table called dually with a column of a single character. When I attempt to run the update statement, no substitution is permitted.
SQL> UPDATE brianl.dually
2 SET dummy = ':x';
SET dummy = ':x'
*
ERROR at line 2:
ORA-12899: value too large for column "BRIANL"."DUALLY"."DUMMY" (actual: 2,
maximum: 1)
Have you tried using concatenation?
UPDATE ADDRESS SET ADDRESS_STREET_LINE1 = 'Moh' || ':' || Chandawala'

Certain characters make moveItemAtURL:toURL:error: crash. how do I avoid them?

First, I'm using Swift. Second this line works fine in my code:
let didIt = fileManager.moveItemAtURL(originalFilePath, toURL: newFilePath, error: nil)
...as long as there are no special characters in the newFilePath. if the newFilePath has a dollar sign or an ampersand ($, & ) in it, the line fails. My issue is that the newFilePath comes from a text field in a window where the user can type any old thing. How do I escape special characters, or encode them so they will pass the test and be included in the new filename?
thanks in advance for any pointers.
My issue is that the newFilePath comes from a text field in a window where the user can type any old thing.
Right there is your problem. Why are you not using an NSSavePanel for letting the user select a name under which to save a file?
If you insist on taking input from a text field, the docs for -URLByAppendingPathComponent: specifically say that the path component string should be "in its original form (not URL encoded)" (emphasis mine).
How did you originally create newFilePath, before appending the path component? For example, you should have used one of the methods with "[fF]ileURL" in the name.

bash: how to make a clickable link with query parameters?

I am trying to dump url on the terminal that needs to be clickable, and the url comes with a query parameter. For example --
google='https://www.google.com/search?q='
orgname='foo bar'
gsearch=$google\'$orgname\'
echo "details: $orgname ($gsearch)"
But the problem is that the clickable link totally omits everything after the q=, i.e. does not include the string 'foo bar', please see the image below --
How do I make a clickable link that includes the query (i.e. the whole url in the braces above)?
Please also note that I am adding quote in the search parameter since the it may contain spaces.
Single quotes are not valid in URLs. Use the URL encoding %27 instead:
google='https://www.google.com/search?q='
orgname='foo'
gsearch=$google%27$orgname%27
echo "details: $orgname ($gsearch)"
Note that it's the terminal and not your script that decides what's considered part of a URL for the purpose of selecting or clicking. The above results in
https://www.google.com/search?q=%27foo%27
which is more clickable in most terminals. The script can't specify what's the extent of the URL except through expressing it in such a standard way that each individual terminal emulator has a decent chance of recognizing it.
PS: I don't think Google cares about surrounding single quotes.

greek character set in oracle

I have a problem with greek characters in oracle 11g. It onlys shows some greek characters and all the others with '?'. I have done all the things above, that I found in internet but can't fix this.
I use win vista (rus/eng version) and set up the greek mui. I've changed NLS_LANG in registry to EL8MSWIN1253 (i've changed that), my system nls_lang is 1253 in registry too.
When i call:
SELECT * FROM NLS_INSTANSE_PARAMETERS
I get NLS_LANGUAGE=AMERICAN and NLS_TERRITORY=AMERICA. I set up oracle with Unicode character set.
I tried to call
ALTER SESSION SET NLS_LANG=GREEK_GREECE.EL8MSWIN1253
but that didn't work. When i call
ALTER SESSION SET NLS_LANGUAGE=GREEK
or
ALTER SESSION SET NLS_TERRITORY=GREECE
Oracle says "Session altered" but nothing changes.
Can anyone please help me?
In Windows: Don’t mess up fonts being used in Command Shell / Command prompt (under Windows) with Windows fonts (e.g. fonts being used in Windows applications, such in SQL Developer).
If you wish to display Greek characters correctly under SQL*Plus in Command prompt:
Identify the active Code Page:
C:\> chcp
The system should respond with the code page number. This for Greek language should be:
Active code page: 737
The 737 corresponds to the
EL8PC737 Oracle Client character set (3rd part of NLS_LANG). See at: http://www.oracle.com/technetwork/database/database-technologies/globalization/nls-lang-099431.html#_Toc110410555
Set the Oracle NLS environment variable:
C:\> set NLS_LANG= GREEK_GREECE.EL8PC737
Now logging in SQL*Plus you will be able to see Greek characters correctly in query results.
Make analogous settings for any other national language.
Panos Zafiropoulos
Did you set NLS_LANG in the registry to .EL8MSWIN1253 (notice the prefix dot)?
The format of NLS_LANG is this:
NLS_LANG = language_territory.charset
...and the Oracle® Database Globalization Support Guide manual writes:
All components of the NLS_LANG
definition are optional; any item that
is not specified uses its default
value. If you specify territory or
character set, then you must include
the preceding delimiter [underscore
(_) for territory, period (.) for
character set]. Otherwise, the value
is parsed as a language name.
Just to point out that character set conversion occurs BOTH ways. So if a client inserts a 'greek' character when their database session indicates an american character set, then the character will be converted from American to UTF-8 (or whatever the DB character set is). A subsequent select by a session with a greek character set will result in the translation of the character from UTF-8 to greek, which might not be what you started with.
Use select DUMP(col) to see they bytes recorded in the database, then you can work out whether the database has the correct representation of the character.
Right Click on my computer > Advance system setting > advance > Environment Variables
Click on System variable on New TAB
Variable name : NLS_LANG
Variable Value : GREEK_GREECE.EL8MSWIN1253
Variable name : NLS_NUMERIC_CHARACTERS
Variable Value : .,

Resources