Setting aplicattion name in .pll
Dear proffesionals,
what's the best way to set Aplication name at runtime - what is the practice which is use in your team ?
I tried to create procedure in pll as follows (username and conn string are useful when users sent etc. print screen):
PROCEDURE set_app_name IS
vc_conn_string VARCHAR2(1000); -- used for creating parameter form
vc_conn_user VARCHAR2(100); -- used for creating parameter form
vc_conn_user_string VARCHAR2(100); -- used for creating parameter form
curform VARCHAR2(40);
blkname VARCHAR2(40);
begin
curform := :System.Current_Form; --cannot use :system variables !!!
blkname := Get_Form_Property(curform,FIRST_BLOCK);
vc_conn_string:=get_application_property(connect_string);
vc_conn_user:=get_application_property(username);
vc_conn_user_string:=vc_conn_user||'@'||vc_conn_string;
set_window_property ('window0',Title,vc_conn_user_string);
set_window_property (forms_mdi_window,title,'My application');
--set_window_property (forms_mdi_window,title,'My application name ');
END;When try to compile, i got this error:
PL/SQL ERROR 49 at line 8, column 13
bad bind variable.... ''So, how to find out current form name ?
Thanks in advance,
Adnan
AS: 10.1.3
Forms&Rep: 10.1.2.3.0
DB: 10.2.0.1.0
adnanBIH wrote:
Sorry, i don't understand how that function could help me - as i said before, i couldn't use global or system variables in .pll functions or procedures....Of course you can...with the help of the name_in built in:
curform := name_in('System.Current_Form');
Similar Messages
-
Can someone tell me how to set my name so when I send a text it shows up instead of my phone number
Can someone tell me how to set my name so when I send a text it shows up instead of my phone number
You can't do that. Only the sending number is transmitted by the carrier with an SMS message. If the recipient has you in their address book, with most smart phones and some others, the name will display, but that's a function of the phone on the receiving end.
-
Setting the name of a new object from a string
Is there anyway I can set the object name of a newly created
object from a string?
eg.
(the code below generates a compile time error on the
variable declaration)
public function addText(newTxt:String, txt:String,
format:TextFormat):void {
var
this[newTxt]:TextField = new TextField();
this[newTxt].autoSize = TextFieldAutoSize.LEFT;
this[newTxt].background = true;
this[newTxt].border = true;
this[newTxt].defaultTextFormat = format;
this[newTxt].text = txt;
addChild(this[newTxt]);
called using>
addText("mytxt", "test text", format);
I could then reference the object later on without using
array notation using mytxt.border = false; for example
There are many a time when I want to set the name of a new
object from a string.
In this example I have a function that adds a new text object
to a sprite.
The problem is, if I call the function more than once then
two textfield objects will exist, both with the same name. (either
that or the old one will be overwritten).
I need a way of setting the name of the textfield object from
a string.
using
var this[newTxt]:TextField = new TextField()
does not work, If I take the "var" keyword away it thinks it
a property of the class not an object.
resulting in >
ReferenceError: Error #1056: Cannot create property newTxt on
Box.
There must be a way somehow to declare a variable that has
the name that it will take represented in a string.
Any help would be most welcome
ThanksUsing:
var this[newTxt]:TextField = new TextField()
is the right approach.
You can either incrment an instance variable so that the name
is unique:
newTxt = "MyName" + _globalCounter;
var this[newTxt]:TextField = new TextField();
globalCounter ++;
Or store the references in an array:
_globalArray.push(new TextField());
Tracy -
Set document name when use PrintToPrinter with Crystal Reports 2008
Hy,
from my application, in .net environment, I print report on printer at runtime with PrintToPrinter command,
but all documents that I print have the same spool name: "document".
Is there a possibility to set this name ?
Thanks
Filipposolution below:
How to set the CR print job name that displayed in Printer job queue? -
Hi guys
I'm using VS + C# for my Add-on
I create my new document by this code:
Document myDocument = myVisioApplication.Documents.Add("MyTemplateFile.vst");
and it create new document for me but the default name of this document is Drawing1.vsdx , Drawing2.vsdx , ....
How can I set another name for that without saving?
Regards
DaneshYou can't, the document name is a read-only attribute, it is set by saving the file.
Paul Herber, Sandrila Ltd. Engineering and software shapes for Visio
Sandrila Ltd -
How to dynamically set the name of the generated PDF file sent by email
Hello,
I am using Reports 10g and I managed to send PDF reports by email, specifying the recipient, subject, format etc, using the reports servlet URL.
But there is one thing that I cannot find a way to do: I want to dynamically set the name of the attached file. It defaults to the name of the RDF file (eg monthly_sales.pdf). I would like it to be something more meaningful (eg monthly_sales_072010.pdf, where 072010 is the month and year passed by parameters).
Is it possible to do it?
Thanks
LuisUse System.load(...) instead of System.loadLibrary(...).
-
Message Mapping : Set Field Name at Runtime
Hi All,
Source structure of my message is :
<recordset>
<Query></Query>----
0 to unbounded
</recordset>
Target Structure :
<SQL>
<key></key>----
0 to unbounded
</SQL>
Now my requirement is such that....if the source message has 3 Query elements then XI should generate key node in target message 3 times but with names key1,key2,key3.
I am not able to set the names of these target nodes at runtime based on the number of query elements in source message.
Can anybody please help me?HI,,
YOu can not change the names of your "Fields".
Hi,
If you want to change Value you can do that by writing UDF.
Enter this code in UDF.
for(int i=0;i<a.length();i++)
result.addValue("");
Regards,
Akshay Jamgoankar.
Reward points if find useful.> -
Hello,
I have an C# application that exports report from Reporting Services to Excel files.
I would like to know if there is a possibility to set the name of the cell or range of cells in the report (via Report Builder or somewhere else) and when open the Excel the names are set. Similar functinality when you open the Excel and go Formulas/Define
Name and set the name for a unique cell or range.
Regards,Hi there,
I don't believe this is possible in Reporting Services. One workaround, if you don't know the exact range at runtime, might be to put hidden characters (white?) in your sheet at start and end of range, then do some postprocessing on the file using
VSTO or perhaps a 3rd-party tool like this one.
http://www.aspose.com/reporting-services/excel-component.aspx
If you do know the range it should be much easier.
cheers,
Andrew
Andrew Sears, T4G Limited, http://www.performancepointing.com -
Set Folder Name From File Name Inclosed.
Hello scripters,
There has been quite a few topics about setting file names from parent folders. I believe it's possible but not sure how to reverse this process. That is to say set the folder name from a file in the folder. This is what I'm imagining.
I've got a folder. In the folder are 100 folders with the names "untitled folder xxx" In side I've got files that are all named and numbered.
For example,
untitled folder/B-day 001~050.jpg
untitled folder 50/At The Park 001~020.jpg
I would like a script to change the name of the parent folder of the files that it houses.
So untitled folder becomes
B-Day
untitled folder 50 becomes
At The Park
etc…
I think getting the name of the first file (minus the index number) would be easiest.
Any help or futher questions are greatly appreciated.
MaximilianWorking backwards...
Assuming all the files have the same name structure (e.g. end in the format "xxx~xxx.jpg" you can get the base name using:
<pre class=command>set baseName to characters 1 through -13 of filename as text</pre>
This cuts off the last 12 characters of the file name.
Once you have a folder, you can get the names of files in the folder via the Finder. for sanity's sake I'd ask the Finder for the first item, just in case there's more than one file:
<pre class=command>set filname to name of first item of (files of folder theFolder)</pre>
And if all the folders are in one top folder, you can iterate through them like:
<pre class=command>repeat with eachFolder in (every folder of folder topFolder)</pre>
So now, string it all together:
<pre class=command>tell application "Finder" -- we'll use the Finder to do the legwork
set topFolder to (choose folder with prompt "Choose the top level folder" ) -- get the top folder
repeat with eachFolder in (every folder of folder topFolder)
set fileName to name of first file of (files of folder topFolder)
set baseName to characters 1 through -13 of fileName as text
set name of folder eachFolder to baseName
end repeat
end tell</pre>
Note there's no error checking - the script will fail if there are no files in any particular folder, but it should get you going. -
Java mapping - Setting the name of the file dinamically
Hi all,
Problem: I know how to set the name of the file in an Idoc to file interface if I'm using a message mapping, but not if I'm using a Java mapping.
I'm using this code inside a user-defined function of the message mapping so that I can set the name of the file dinamically:
public String GetFileName(String inboundParameter,String IdocNumber,Container container){
String filename;
java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
filename = "cikk_" + dateformat.format( new java.util.Date() ) "_" IdocNumber + ".txt";
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
conf.put(key, filename);
return inboundParameter;
(See also: /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14)
But how can I do that if I'm using a Java mapping??
I don't have the class Container there. How can I retrieve the DynamicConfiguration object without that class?
Thank you very much.Thank you Jin,
I knew that it had to be related with the Map object got in setParameter, but in this link:
http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
you can't find the constant DYNAMIC_CONFIGURATION.
I think it's not up to date. -
Setting the name of streamed zip file
Hi,
I have a servlet which creates a zip file with documents retrieved from a database. To create the zip file I am using the ZipOutputStream class and adding the documents one at a time to this object. This is all working fine.
The problem I have is pretty simple, in that I can't seem to find a way in which to set the name of the zip file. This must be possible! At the moment it appears to be setting the name of the zip file to the name of the class that created it. In this case my class is called DocumentPacker and what comes back from the servlet is a zip file called DocumentPacker.zip. This wouldn't be so bad, but if you're creating the zip file for a user that does not have cookies enabled, it appends the session id to the end of the zip file name which i don't want.
I am creating my ZipOutputStream like this:
ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
and then adding the documents one at a time using a BufferedInputStream.).
Any help on how to set the name would be much appreciated
Thanks
ClaireYour servlet must set some headers on the HTTP response (Content-Type as "application/zip", Content-Disposition as "attachment; filename=yourfilename.zip")
Read the RFC1806 document.
Content-Type: application/zip
Content-Disposition: attachment; filename=genome.jpeg -
How to set the name of the spool's record in report
Hello everyone:
I have just met a problem in setting a name of a spool record in report.
Does anyone have an idea?
Thanks for your help...Hello everyone:
I have just met a problem in setting a name of a spool record in report.
Does anyone have an idea?
Thanks for your help... -
How to set dynamic name of the mail attachment according to source file ?
Hi,gurus:
Our scenario is like below:
Sending files from an FTP server to another FTP server without using the integraiton repositary,and the file name is not changed .Now, we want to also send the file to some with by mail adapter.The scenario now works by using two business services in receiver determination.But the name of the attachment is "untitled.xml".We know how to set the file name staticly,but how to set the name dynamicly according to the source file name ?
I have checked miachel's blog "XI: Dynamic name in the mail attachment - pseudo "variable substitution"(/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution),but how can I get the source file name?
And another question:Must we restart the adapter or j2ee engine to make the user defined module work?Hi,
>>>but how can I get the source file name?
form dynamicconfiguration (ASMA)
>>>And another question:Must we restart the adapter or j2ee engine to make the user defined module work?
no need for a restart
Regards,
Michal Krawczyk -
Setting Column Names in Dynamic Pivot Query
Hi all,
I'm having trouble setting column names in a dynamic pivot query and was wondering if someone could please help me figure out what I need to do.
To help you help me, I've setup an example scenario in my hosted account. Here's the login info for my hosted site at [http://apex.oracle.com]
Workspace: MYHOSTACCT
Username : DEVUSER1
Password : MYDEVACCTAnd, here is my test application info:
ID : 42804
Name : dynamic query test
Page : 1
Table 1: PROJECT_LIST (Alias = PL... Listing of Projects)
Table 2: FISCAL_YEAR (Alias = FY... Lookup table for Fiscal Years)
Table 3: PROJECT_FY (Alias = PF... Intersection table containing project fiscal years)
Table 4: PROJECT_FY_HEADCOUNT (Alias = PFH... Intersection table containing headcount per project and fiscal year)Please forgive the excessive normalization for this example, as I wanted to keep the table structure similar to my real application, which has much more going on.
In my sample, I have the "Select Criteria" region, where the user specifies the project and fiscal year range that he or she would like to report. Click the Search button, and the report returns the project headcount in a pivoted fashion for the fiscal year range specified.
I've got it working using a hard-coded query, which is displayed in the "Hardcoded Query" region. In this query, I basically return all years, and set conditions on each column which determines whether that column should be displayed or not based on the range selected by the user. While this works, it is not ideal, as there could be many more fiscal years to account for, and this is not very dynamic at all. Anytime a fiscal year is added to the FISCAL_YEAR table, I'd have to update this page.
So, after reading all of the OTN SQL pivot forums and "Ask Tom" pivot thread, I've been able to create a second region labeled "Dynamic Query" in which I've created a dynamic query to return the same results. This is a much more savvy solution and works great; however, the column names are generic in the report.
I had to set the query to parse at runtime since the column selection list is dynamic, which violates SQL rules. Can anyone please help me figure out how I can specify my column names in the dynamic query region to get the same column values I'm getting in the hardcoded region?
Please let me know if you need anymore information, and many thanks in advance!
MarkHi Tony,
Thanks so much for your response. I've had to study up on the dbms_sql package to understand your function... first time I've used it. I've fed my dynamic query to your function and see that it returns a colon delimited list of the column names; however, I think I need a little more schooling on how and where exactly to apply the function to actually set the column names in APEX.
From my test app, here is the code for my dynamic query. I've got it in a "PL/SQL function body returning sql query" region:
DECLARE
v_query VARCHAR2(4000);
v_as VARCHAR2(4);
v_range_from NUMBER;
v_range_to NUMBER;
BEGIN
v_range_from := :P1_FY_FROM;
v_range_to := :P1_FY_TO;
v_query := 'SELECT ';
-- build the dynamic column selections by looping through the fiscal year range.
-- v_as is meant to specify the column name as (FY10, FY11, etc.), but it's not working.
FOR i IN v_range_from.. v_range_to LOOP
v_as := 'FY' || SUBSTR(i, 3, 4);
v_query := v_query || 'MAX(DECODE(FY_NB,' || i || ',PFH_HEADCOUNT,0)) '
|| v_as || ',';
END LOOP;
-- add the rest of the query to the dynamic column selection
v_query := rtrim(v_query,',') || ' FROM ('
|| 'SELECT FY_NB, PFH_HEADCOUNT FROM ('
|| 'SELECT FY_ID, FY_NB FROM FISCAL_YEAR) A '
|| 'LEFT OUTER JOIN ('
|| 'SELECT FY_ID, PFH_HEADCOUNT '
|| 'FROM PROJECT_FY_HEADCOUNT '
|| 'JOIN PROJECT_FY USING (PF_ID) '
|| 'WHERE PL_ID = ' || :P1_PROJECT || ') B '
|| 'ON A.FY_ID = B.FY_ID)';
RETURN v_query;
END;I need to invoke GET_QUERY_COLS(v_query) somewhere to get the column names, but I'm not sure where I need to call it and how to actually set the column names after getting the returned colon-delimited list.
Can you (or anyone else) please help me get a little further? Once again, feel free to login to my host account to see it first hand.
Thanks again!
Mark -
How to dynamically set column name in Answers
Hi.
How to dynamically set column name in Answers, for example I want to put presentation variable in column header. Is this possible?
Regards,
Goran Ocko
http://108obiee.blogspot.com/May be a rude way .. but it works.
Add narrative view and use Java script to change the column headings based on the variables.
<script language="javascript" type="text/javascript">
var a = document.getElementById('idResultsTableParent');
var rows= a.getElementsByTagName('tr');
rows[1].cells[1].innerText ="@{Presentation Variable}";
</script>
Editing the same post to remove irrelevant information.
- Girish
Maybe you are looking for
-
How to pivot using pivot clause of sqlserver 2005 for three values
Dear all Is it possible to formulate the query using pivote clause of sqlserver 2005. ( Table name is) BridgeHawra ReportDate, , Pole, DiameterCost,Flag,OuterDiaCost 01 jan 2014, ,1 , 4.5 ,yes,6 01
-
I added some new music to my itunes library and tried to sync it with my ipod touch but the song don't appear in my ipod touch. With my ipod shuffle it works perfectly but with the ipod touch it just doesn't sync and the songs aren't in my ipod. They
-
Satellite P840 - Unable to restore system image of Win 8.1
I have Toshiba P840 laptop which came with windows 8.0. I created DVD and USB backups After upgrade to windows 8.1 and saving images, I had a problem software and needed to go back to a previous back in windows 8.1. The restore from the external HDD
-
Monitoring of failed Messages in XI.. Any one place to see them???
Hi All, Is there any place where we can see all the failed messages for particular week or particular month in XI. Like in SAP, we can go and see in WE02 transaction where we can see all the failed idocs. In the same way is there anyway where we can
-
Streaming live video from the wedding
Next week will see me in Cancun Mexico at my niece's wedding. I was planning a relaxing wedding day of drinking but today, my brother in law, the fathers bride wants to know if I can live stream the wedding (video and audio) to his brother in Calgary