Call an array with dynamic name..
Hi there,
Oh, how these syntax problems confuse me !! I just want to create a name dynamically to push to one of multiple arrays.. can someone please correct my syntax ??
var col20:Array = [];
var tempRef:uint = 20;
var gridRef:uint = 360;
var theArray = this["col" + tempRef];
theArray.push(gridRef);
hello relaxatraja,
What I need to do is push the value 'gridRef' to the array 'col20' using my 'tempRef' (20) for the dynamic naming of the array, but I'm using Object syntax.
Imagine :-
var col20Array:Array = [];
What I need is ["col" + tempRef + "Array"].push(gridRef);
So the array NAME is dynamic.
Similar Messages
-
FTP Activity - mget multiple files with dynamic names
Hello All
Hope all is well.
I was wondering if there was a way to configure FTP activity to transfer multiple files with dynamic names from source location at daily intervals.
For example, my source files are affixed with date values (source_filename_<mmddyyyy>_<hh>.txt):
source_filename_12252009_00.txt
source_filename_12252009_06.txt
source_filename_12252009_12.txt
source_filename_12252009_18.txt
What I would like my process flow to do would be to download just these 4 files once daily based on a dynamic ftp script as follows:
open ${Remote.Host}
${Remote.User}
${Remote.Password}
cd ${Remote.RootPath}
prompt off
mget ????????
quit
In DOS batch script you would have the mget command with a wildcard as:
mget source_filename_%DATE:~0,2%%DATE:~2,2%%DATE:~4,4%*.txt
How does one go about implementing this in OWB? Does it require a user defined substitution varilable of some sort?
FYI, I am using version 10gR2.
Cheers.Hi ,
If you are able to achieve your objective from a DOS batch script then you can call that script for an User Defined Activity in OWB process flow .
Hope this helps.
Thanks,
Sutirtha -
how would you give an array a dynamic name?
for(f=0;f<6;f++){
for(g=0;g<hexArray.length;g++){
if(f==0){
var kleurenIndexArray:Array = [] <---- this has to be a
dynamic name like [kleurenIndexArray+f]
kleurenIndexArray.push("0x"+g+"00000")
All the things i've tried haven't workedI'm not sure exactly what you're trying to do but to give any
variable name based on a variable by doing something like:
x=3;
this["test"+x]="hello";
this is the equivalent of writing:
test3="hello";
you would do the same for arrays such as:
x=3;
this["test"+x]=new Array();
this is the equivalent of writing:
test3=new Array();
however, why not create an array rather than a variable with
a dynamic name? my example above could be the following instead:
eg
test=new Array();
test[3]=new Array();
this would give you a multidimensional array.
Does this answer your question? -
Recive a file with dynamic name
Hi All,
I want to receive a file with dynamic name containing date stamp to it.... eg File_20080123.txt , File_20080122.txt etc.
Can anybody suggest how to do it?
Thanks,
AtulAtul,
Are u using mapping program in ur interface? If yes you can go ahead with ASMA + Dynamic Configurations for renaming the file.
Have u tried this option?
See the below Solution
Check the ASMA File for both sender/receiver channels.
Write the below code UDF in mapping program
//Get Input date. Don't pass anything to this UDF except the Date.
//Map the output to the root node of the target.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String fname = conf.get(key);
String ret = fname"_"Date
return "";
raj.
Edited by: Raj on Jan 23, 2008 4:09 PM -
Calling variables with dynamic names
so lets say theres 5 variables,
name1 = "james";
name2 = "billy";
name3 = "nilly";
name4 = "dilly";
name5 = "alfred";
is there any way to enumerate through those names by doing something like this...
for(i=1;i<6;i++){
System.out.println(["name"+i]) // where ["name"+i] uses variable name1, name2, name3 etc...
ending up with something like
james
billy
nilly
dilly
alfred
i know its possible to do it in some other programming languages, and if java can do it too, it'd be very useful to me.woops - noticed I was in New To Java...
You can search for this, the question came up quite a bit some time back.
Use an implementation of Map (like HashMap) and call the put method with the name you want as a key and the value as a value. You can then call get with the name to get the value, or you can iterate over the key set to do what you're after.
Or, you could create a "Name" array (or List) and the you get "name0", let's say, by saying "name[0]" or nameList.get(0).
Make sense?
Good Luck
Lee -
Creating many arrays with different names
I'm trying to create many arrays with a different names by calling this method:
n=name of array
c= some string
public Array[] newArray(String n, String c)
n[n.length]= new String();
n[n.length]= c;
As you experts might guess this does not compile. Is it even possible to do this?no, you cannot make a dynamic variable like that.
and no, that is not the way to make arrays.
and no, there is no such thing as "Array[]" ( unless u have made an "Array" object ).
code for a new array is as such
public Object[] newArray(int size){
return new Object[size];
}called as such:
String[] strings = (String[]) newArray(10);
strings[0] = "hmmm";mmmmm -
How to call javascript function with dynamic data in display tag
Hi,
Iam new to pagination concept. Iam using display tag to display rows in jsp by strtus.
I have a problem when calling the javascript function using ahref in attribute in display tag.
<bean:define name="form1" property="EditDetails.List" id="ListDisplay"/>
<display:table name="pageScope.ListDisplay" cellpadding="0" cellspacing="1" pagesize="10" partialList="false" size="listSize" requestURI="">
<display:column property="poNo" href='javascript:searchEditDetails("./submitOrder.do? actionID=getMISLoadEdit&poNumberSel=<%=((com.po.bean.EditDetails)poListDisplay).getNo()%>&statusIdSelected=<%=((com.po.bean.EditDetails)ListDisplay).getStatusId()%>")'
title="Number"/>
<display:column property="strDate"title="Date" />
<display:column property="orderValue"title="Order Value(INR)"/>
<display:column property="stringRequestedDeliveryDate"title="Suggested Delivery Date"/>
<display:column property="statusDescription" title="Status" />
</display:table>
The above code display the data in row format is working fine when I click the No It thow javascript error and its not redirecting to the other page.
When I try this with ordinary struts its working fine the code is:
<logic:iterate id="polist" name="Form1" property="EditDetails.List" indexId="i" type="com.bean.EditDetails">
<tr>
<td ><a href="javascript:searchEditDetails("./submitOrder.do?actionID=getMISLoadEdit&NumberSel=<%=((com.bean.EditDetails)polist).getNo()%>&statusIdSelected=<%=((com.bean.EditDetails)polist).getStatusId()%>")"><html:hidden name="polist" property="No" write="true" /></a> </td>
<td><html:hidden name="polist" property="strDate" write="true" /></td>
<td><html:hidden name="polist" property="orderValue" write="true" /></td>
<td><html:hidden name="polist" property="stringRequestedDeliveryDate" write="true" /> </td>
<td><html:hidden name="polist" property="statusDescription" write="true" /></td>
</tr>
</logic:iterate>
Please help me how to call javascript with dynamic data.
Thanks in advanceThe ADF Mobile Container Utilities API may be used from JavaScript or Java.
Application Container APIs - 11g Release 2 (11.1.2.4.0) -
ABAP WebDynpro app calling Transaction iview with Dynamic Parameters..?
Good day!
I need to code a call to a transaction (with dynamic parameters) from an Abap WD application. It appears that to achieve this, the app needs to call a new portal transaction iview, passing the parameters in the call..?
This should ideally be via a Sapgui for Windows, but Html also an option (does it matter with regards to the method used?).
Kindly assist with advise/instructions, idealy with sample code extract to illustrate (new to Abap WD)...
Kind regards
jHi
this will help you doing so
http://help.sap.com/saphelp_nw04s/helpdata/en/18/f96f4132f15c58e10000000a1550b0/frameset.htm
Use BUSINESS_PARAMETERS to pass the data
Abhi -
Call outside function with same name in a package
I created a function as follows:
create or replace function f1 return number
is
begin
return 1;
end;
This f1 is to be called in a package created below.
Then I create a package with a function in it, as follows:
create or replace package pack1 as
function f1 return number;
end;
Now I define the package body as follows:
create or replace package body pack1 as
function f1 return number as
-- I am trying to call the first function f1 defined above here
How do I resolve the name issues here?
In other words, I want to call a function with the same signature outside a package.
Thanks for your kind help.Hi,
Welcome to the forum!
Do you have a good reason for using the same name?
Refer to the stand-alone function with the owner name, even though it's your current schema.
That is, even if the package and the stand-alone function are owned by scott, in the package, say
x := scott.f1; -
Multi-dimensional array with dynamic size - how to?
Hi
I have a CONSTANT number of buckets. Each of them has to take a VARIOUS number of data series. The data series have one VARIOUS length per bucket. I'd like to index the buckets like an array to loop over them.
So basically I need something like a multidimensional array with constant first dimension (bucket index), but dynamic second (data series index within bucket) and third (data point index within data series) dimension. What's the best way to do so?
I should also remark that data series can get really big.
Thanks in advance and best regards,
MichaelHi Michael,
the usual way is to use an array of cluster.
Put your "2nd" and "3rd" data into a cluster and then make an 1D array of that cluster...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
I need to include a page with a name I do not know in advance. I can do this with <jsp:include page="${filename}"/>.
Can I also do it somehow using tag files?Atul,
Are u using mapping program in ur interface? If yes you can go ahead with ASMA + Dynamic Configurations for renaming the file.
Have u tried this option?
See the below Solution
Check the ASMA File for both sender/receiver channels.
Write the below code UDF in mapping program
//Get Input date. Don't pass anything to this UDF except the Date.
//Map the output to the root node of the target.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String fname = conf.get(key);
String ret = fname"_"Date
return "";
raj.
Edited by: Raj on Jan 23, 2008 4:09 PM -
Struggling to create reports with dynamic names.... need help
Hi everyone
The reports that I create need to be named with dynamic content from the database. I did try to find if such an option exists in oracle portal, but alas to no avail. My report templates are going to be the same , but as the report content changes so should the report title. Does anyone has a solution to my problem
Thanx in anticipationsorry ..it was silly of me ... i just found out the solution
-
Calling SQL Loader with Dynamic file names
HI all
I woul like to know if I can call sql loader as below
$ sqlldr userid=uname/pwd control=new.ctl, data=$1
I have to schedule my loader 3 times a day and each time my file names are different(AAA_BBB_timestamp)
ThanksI have found a solution myself and if any one is interested its like this
for file in `ls -1 /opt/user/from/`
do
sqlldr userid=user/pwd@connect_string control=control_file.ctl data="/opt/user/from//$file"
done
Ramu -
In EP, call R3 transaction with dynamic variant name
Hello
I know that I can call a R3 transaction with a dedicated variant thanks to the process below:
Create a transaction iview , Tcode = "START_REPORT"
In application parameters pass these values separated by '&' sign.
D_SREPOVARI-REPORT - your report
D_SREPOVARI-VARIANT - your saved variant.
choose skip inital screen in the parameters.
But do you have a tip to call a different variant for every user.
For example, I have users "1111" and "2222". In R3 I have created the variant "1111" and "2222" for a transaction.
In EP, I would like that when I call this transaction connected as "1111", the variant "1111" is used, and when I'm logged as "2222", the variant "2222" is used.
Do you know how I can do that ?
Thank you !Hello,
where is the information which user has to call which variant stored? If it's in R/3 then you can write an wrapper report which is called from the Portal, adds the Variant information and then calls the original report.
Regards
Gregor -
What am I missing? I've got alerts that should pop up if it works and if it fails but instead it does nothing, I'm sure its possible to create an array that is made up of all the file names of a folder. In the past I've had to enter all the values one a time and some of these folders have 200+ files in it.
#target illustrator
filltotesTempArr
function filltotesTempArr()
var toteTemparray = new Array(toteTemps)
var toteTempPath = Folder ("S:/Illustrator JS Palette/Direct Template Calls/Totes");
var allFiles = artPath.getFiles(order);
var toteTemps
if (allFiles.length > 0)
for (i=0;i<allFiles.length;i++)
toteTemps = toteTemps + app.open(allFiles[i] )
}//end for
alert("Your array has the current values:" + toteTemps);
}//end if
else
alert("Script to fill Totes Templates Array has failed");I need to take all the files inside of a folder, and put their file names in an array like this;
var totesarr1= new Array ("A165331","A165332","A165333","A165334","A165337","A165338","A165344","A165348", "A165349",
"A165352","A165353","A203","A210","A211","A214","A222","A229","A231","A232","A234","A248","A250","A252","A268",
"A271","A272","A278","A290","A292","A322","A323","A324","A325","A327","A330","A402","A404","A405","A407","A408",
"A409","A410","A411","A414","A415","A417","A420","A422","A423","A424","A425","A427","A430","A436","A438","A439",
"A440","A441","A443","A446","A448","A449","A450","A451","A452","A454","A455","A456","A460","A461","A468","A470",
"A490","A495","A497","A500","A508","A509","A510","A512","A513","A514","A518","A524","A525","A526","A527","A530",
"A533","A534","A536","A543","A581","A582","A587","A602","A619","A624","A705","A707","A710","A714","A715","A739",
"A740","A741","A742","A743","A744","A745","A748","A750","A751","A752","A753","A754","A755","A756","A763","A800",
"A801","A804","A806","A811","A815","A817","A818","A819","A824","A832","A835","A836","A838","A841","A844","A848",
"A849","A852","A854","A856","A857","A859","A861","A863","A865","A866","A868","A871","A873","A877","A879","A881",
"A885","A888","A890","A894","A899","A900","A902","A904","A940","A941","A943","A944","A945","A948","A97307","A97309",
"A97313","A97314","A97315","A97316","A97321","A97326","A97340","A97342","A97708","A97715","F742","F751","V6432");
so the closest thing that I can come up with is this;
#target illustrator
filltotesTempArr
function filltotesTempArr()
var toteTemparray = new Array(toteTemps)
var order = new RegExp(input);
var toteTempPath = Folder ("S:/Illustrator JS Palette/Direct Template Calls/Totes");
var totetempnames = toteTempPath.getFiles();
var totetemps = new Array ()
var allFiles = toteTempPath.getFiles();
if (allFiles.length > 0)
for (i=0;i<allFiles.length;i++)
toteTemps = toteTemps + "," + app.open(allFiles[i])
}//end for
alert("Your array has the current values:" + toteTemps);
}//end if
else
alert("Script to fill Totes Templates Array has failed");
alert ("Script is Done")
but even this dosn't work like it should
#target Illustrator
GetTempNames;
function GetTempNames ()
var toteTempPath = Folder ("S:/Illustrator JS Palette/Direct Template Calls/Totes");
var toteTempNames = toteTempPath.getFiles()
var totetemparr = new Array ( toteTempNames )
alert ("script is done get ready");
alert ("Here " + totetemparr);
so now I'm at a loss
Maybe you are looking for
-
My apple I'd has stopped asking for my password when downloading apps to my iPad. I want it to ask every time. I edited it unknowingly and I need to change it back. Please help! Thx
-
Error in report S_ALR_87011964 [Asset Balances]
Hi, I am facing an issue with asset balance report generated through S_ALR_87011964. Issue details Asset Value - 10,000 US$ Life - 10 Yrs Method - Straight line method Date of purchase - 01.01.2008 Depn per annum - 1,000 US$ While i run the report as
-
LSMW : When to speficy logical fiel path
Hi all When I am creating LSMW project, during the Step <b>SPECIFY FILES</b>, some times it was asking for <b>Logical file path</b> and some times It was not asking, I am unable to differentiate in which situations it was looking for Logical file pat
-
WIndows compatibility issue for itunes 7
I just upgraded to itunes 7. My shortcut icons for itunes are no lnger itunes images but a generic icon. Also when I open itunes it says my "version of itunes is set to run in compatibility mode to run with al older version of windows. For best resul
-
Swype, Gmail, and SPB on NOKIA N8
Short video goes through N8 with Joiku, Swype, Gmail, and best of all the beautiful SPB Shell! http://www.youtube.com/watch?v=6Rzt9JuLPvY&t=2m10s