How to call a variable with a loop count in it
First - I have a variable called "stages" this is a number
that can vary. Because it can vary I want to run things in a loop
based on the number that comes up as the stages variable amount.
Second is a loop
<cfloop index="riderCount" from="1" to "9">
Next, I have a query
<cfquery name="getPts" datasource="#application.dsn#">
SELECT *
FROM fantasy_racers
WHERE proName='#pro#''
</cfquery)
** Note: variable pro is set before the query **
I have colums in my table: pts1, pt2, pts3, etc. all the way
to pts25 for each pro in the table.
Now to the heart of the matter
I want to get the amount in each column. EX.: #getPts.pts1#
but since the number of stages can vary I don't want to hard
code for 25 outputs when there may only be 7
so how can I call the column amount but utilize a ridercount
in place of the number
#getPts.pts
ridercount#
You can reference query variables in an array-of-structures
notation:
myQuery["MyColumn"][row]
so you could do something like this:
#getPts["pts" & riderCount][1]#
Combine that syntax with Query.CurrentRow and
Query.recordCount and you should be able to put a loop together
that solves your problem.
Similar Messages
-
How to call PDF Report with parameters in jdeveloper 10.1.3
Hi all,
how to call PDF Report with parameters in jdeveloper 10.1.3
for example I have Report name is repdept.pdf with parameter as deptno
and I want call this Report from JSP page ?
thanks
frankHi all,
how to call PDF Report with parameters in jdeveloper 10.1.3
for example I have Report name is repdept.pdf with parameter as deptno
and I want call this Report from JSP page ?
thanks
frank -
How to call standard report with in zprogram?
Hi Sap experts,
How to call standard report with in zprogram.
For example if country is 'US' then call Zprogram(zprog_US).Inside zprogram call standard report(rhecm_change_proc_status).If country is 'CA' then call zprogram.Inside zprogram call standard report.For same othercountres like 'PR','GB','ES'.Actually HR_ECM_READ_FEATURE_CARGP will having the input as employee id and will return the CAREA(County like 'US','PR'......).Kindly help me what is the procedure?
Regards,
Sujan>
sujan T wrote:
> Thanks for your reply.
>
> What is the logic to call the standard report from zprogram?Inside the zpogram how to call standard report?
>
> Regards,
> Sujan
no special logic is required
If u want to use
RPUAUDOO IN THE ZREPORT.
Put the submit button where ever required
ex: In zreport after certain process reacedu want to call then use
submit rpuaudoo and return.
Regards
Sas -
How to call a form with dabble clicking on a record with one time where
Hi All,
How to call a form with dabble clicking on a record with one time where clause. I mean when i dabble click on the current record i want to call another form with details of the
record with onetime where clause. Can anyone help me in this regard.
Now i am calling a form with parameter with onetime where but this should avoid.
Thanks in advance
ArifHello,
I mistakenly mark it as solved. There is a problem remain. when i placed the code below it do not execute with the where condition. I mean the condition to execute is not work.
All records executes. Please correct my code--
Here the WHEN-BUTTON-PRESSED-trigger on the Edit-Button:
:GLOBAL.MODE:='EDIT';
:GLOBAL.REQ_ID:=:PROBLEM_REQUEST.REQ_ID;
CALL_FORM('REQUEST_ID_PARAM',NO_HIDE,DO_REPLACE,NO_QUERY_ONLY);And also, WHEN-NEW-FORM-INSTANCE-trigger of REQUEST_ID_PARAM:
DEFAULT_VALUE(NULL, 'GLOBAL.MODE');
DEFAULT_VALUE(NULL, 'GLOBAL.REQ_ID');
IF :GLOBAL.MODE='EDIT' THEN
GO_BLOCK('PROBLEM_REQUEST');
EXECUTE_QUERY;
SET_BLOCK_PROPERTY('PROBLEM_REQUEST', INSERT_ALLOWED, PROPERTY_FALSE);
END IF;Arif -
How to call html page with in the flash
I am new to action script, can some one guide me how to call html page with in the flash. lets say i have movie clip having instance name as "news_feed", I need to disply the html page in this news_feed. kindly help me, thanks alot
some one tell me, weather it is possible or not ??
-
How to call a package with ADO?
I have designed a package which include a procedure. And I have a program coded in ASP.
How to call this package with ADO. Please give a sample.Hi,
I persume that you are facing this problem when u try to code in VB. If that is the case here comes the code.........
OraDatabase.Parameters.Add "A_NBR_NEWSID", A_NBR_NEWSID, ORAPARM_INPUT, 2
OraDatabase.Parameters.Add "A_NBR_TOPICID", A_NBR_TOPICID, ORAPARM_INPUT, 2
OraDatabase.Parameters.Add "A_NBR_USERID", A_NBR_USERID, ORAPARM_INPUT, 2
OraDatabase.Parameters.Add "result", 0, ORAPARM_OUTPUT
OraDatabase.Parameters("result").serverType = 2
OraDatabase.ExecuteSQL ("declare result Number; Begin :result := PKG_CONTENT_MANAGEMENT.FUN_GET_NEWS_PERM_BY_USERID(:A_NBR_NEWSID, :A_NBR_TOPICID, :A_NBR_USERID); end;")
OraDatabase.Parameters.Remove "A_NBR_NEWSID"
OraDatabase.Parameters.Remove "A_NBR_TOPICID"
OraDatabase.Parameters.Remove "A_NBR_USERID"
FUN_GET_NEWS_PERM_BY_USERID = OraDatabase.Parameters("result").Value
OraDatabase.Parameters.Remove "result"
Hope this clear your doubt..
Raj -
How to call a transaction with a variant
Hi all
I created a bdc program after updating it should call another transaction with predefined variant that that transaction program is of type module pool.
can anyone tell me the syntax how to call a transaction with a variant.Hi
goto Tcode SHD0
enter the Tcode for which Tran Variant has to be created(dialog Tcode)
enter Trans variant to be created
press create button
it will go through all the screens of that Tcode and save
and modify the fields as per requirement
we can create Transaction Variants Using SHD0 Transaction.
Transaction Variants and Screen Variants
Transaction variants can simplify transaction runs as they allow you to:
Preassign values to fields
Hide and change the 'ready for input' status of fields
Hide and change table control column attributes
Hide menu functions
Hide entire screens
In particular, hiding fields in connection with screen compression, and hiding screens, can result in greater clarity and simplicity.
Transaction variants are made up of a sequence of screen variants. The field values and field attributes for the individual screens found in transaction variants are stored in screen variants. Each of these variants is assigned to a specific transaction, can, however, also contain values for screens in other transactions if this is required by transaction flow. The transaction that the variant is assigned to serves as initial transaction when the variant is called.
There are both client-specific and cross-client transaction variants. All screen variants are cross-client, but may be assigned to a client-specific transaction variant.
A namespace exists for cross-client transaction variants and screen variants and both are automatically attached to the Transport Organizer. Client-specific transaction variants must be transported manually.
In principle, transaction and screen variants can be created for all dialog and reporting transactions. There are, however, certain Restrictions that apply to certain transactions, depending on their internal structure.
No transaction variants are possible with transactions already containing preset parameters (parameter transactions and variant transactions).
Regards
Anji -
How to call java function with parameter from javascript in adf mobile?
how to call java function with parameter from javascript in adf mobile?
The ADF Mobile Container Utilities API may be used from JavaScript or Java.
Application Container APIs - 11g Release 2 (11.1.2.4.0) -
How to call two variable which are hold multiple value in to for loop
hi,
i have 4 item ,Two Select List And Two Check Box .Class id And Section are select list and student id and subject id are check box .i want to insert More then one subject id in to table corresponding to more then one student id .
eg. when i select class id 1 and section A then student id of class 1 and section A comes into Student id(check box item ) and all subject corresponding to class 1 comes into subject id( check box item).
now i want to insert multiple selected subjects with respect to selected multiple student id in to table when i press submit Button.
My table is
CREATE TABLE "STUDENT_SUBJECT_DETAIL"
( "S_NO" NUMBER,
"STUDENT_ID" NUMBER,
"SUBJECT_ID" VARCHAR2(50),
"SESION" VARCHAR2(50)
i am using this Code
DECLARE
STU wwv_flow_global.vc_arr2;
SUB wwv_flow_global.vc_arr2;
begin
STU:= wwv_flow_utilities.string_to_table(:P57_STUDENT_ID);
SUB := wwv_flow_utilities.string_to_table(:P57_SUBJECT_ID);
for i in 1..STU.count loop
for i in 1..SUB.count loop
insert into STUDENT_SUBJECT_DETAIL
values(CLA_SUB_ID_SEQ.nextval,STU(i),SUB(i),:p57_SESION);
end loop;
end loop;
END;
Edited by: Manoj Kaushik on Nov 20, 2009 10:10 PMDECLARE
STU wwv_flow_global.vc_arr2;
SUB wwv_flow_global.vc_arr2;
BEGIN
STU:= wwv_flow_utilities.string_to_table(:P57_STUDENT_ID);
SUB := wwv_flow_utilities.string_to_table(:P57_SUBJECT_ID);
FOR i in 1..STU.count LOOP
FOR i in 1..SUB.count LOOP
insert into STUDENT_SUBJECT_DETAIL
values(CLA_SUB_ID_SEQ.nextval,STU(i),SUB(i),:p57_SESION);
end loop;
end loop;
END;This doesn't look right to me:
1. You have 2 loops, and they are both using the variable i as a counter.
2. Your insert needs to be in the form: insert into table (column names) values (values to insert)
3. Why not use a trigger to get the nextval from the sequence?
Trent
Edited by: tr3nton on Nov 21, 2009 4:16 PM -
How to call a function with parameters in ScriptStart function
i am trying to call ScriptStart function from SUD dialog. This is how iam calling Call ScriptStart(path & "test.vbs","abc") abc is function which is written test.vbs. It is working. But when i want to pass some parameters to the abc function of test.vbs. It is not working why. can anybody suggest where i went wrong. I am calling the same function as Call ScriptStart(path & "test.vbs","abc(" & text1.Text & ")"). It is not working why ? Is the ScriptStart function only point to functions. it does not take any parameters or waht ?
Hi abc421,
Another option in addition to UserCommands would be to use ScriptInclude(path). If you execute a ScriptInclude(path) command at the beginning of your VBScript, then all the functions and Subs in the VBscript located at "path" are now available to you-- including passing parameters and receiving return values from functions. If you are calling a VBscript that uses only VBScript variables, then this is the preferred method.
If instead you are calling a VBScript that uses global DIAdem variables declared in a VAS file (their variable names all end with the "_" character), then those parameters are already available at the subroutine called with ScriptStart(path, routine).
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
How to call a variable from another class?
Greetings
I�m designing a program that is called Senior.java, and I want to design it�s menus, for simplicity in reading the code, I want to write a separate java file for each menu. For example I want a file.java, edit.java etc�.
Since I�m not a professional I�m having problems in calling the variable �bar�, that I created in senior.java,
In Senior.java I have :
JMenuBar bar = new JMenuBar();
setJMenuBar( bar );
In fileMenu.java I want to add file menu to the menu bar �bar�:
bar.add( fileMenu );
When I compile the fileMenu.java I got a �cannot resolve symbol � message, where symbol is the variable bar.
Can you please help me, knowing that i'm using SDK1.4.1?Sun has recommendations for naming conventions. Class names should start with a capital letter. You should avoid using class names that are the same as classes provided in the SDK. Following these conventions will make it easier for people to help you. For example, you should not use file, nor should you use File. It's better to use MyFile, replacing My with something that makes sense to your application (SeniorFile?).
Also, check the Formatting Help link when posting for a desciption on how to use the code tags for posting code.
1. You need to establish references between your classes. One way is to have a constructor that has a JMenuBar argument.
2. You can not add a file to a JMenuBar because a JMenuBar adds a JMenu. I don't think you want file to extend JMenu. It may be better for file to have a JMenu.
I haven't tried to compile this code so no guarantees - just trying to show you an approach.
public class Senior extends JFrame {
public Senior() {
JMenuBar bar = new JMenuBar();
MyFile file = new MyFile(bar);
//whatever else you need
public class MyFile {
public MyFile(JMenuBar mbar) {
JMenu menu = new JMenu();
mbar.add(menu); -
How to convert the Variable with soap header to non soap variable.
I am working on a customized flow simialr to ProcessSalesorderFulfillmentJMSCOnsumer and Requestor ABCS. I dont have the PIP codes for the Requestor adn JMS Consumer. i built my own Requester ABCS and JMS Consumer. When i am trying to send message from JMS Consumer to Requestor ABCS in a variable with a SOAP:Env and SOAP:body inside.
Becoz of this i was not able to put a condition in my bpel flows. If i put a condtion on this variable like switch inputvariable:part:OrderType='NEW' and it was failing with selection failure. I tried copying the variable to a new variable and then to check the condition still it does not work for me. How do i convert the SOAP Message Variable to Non SOAP Message Variable.
Can i know the message put by SIebel in JMS Queue was it SOAP converted adn then how they are going to handle in Process Sales order Requestor ABCS.HI,
In JMS Consumer of order to cash pip, Instead of using a schema reference they use a Envolpe.zxsd file which will take care of conversion adn then other artibutes are mapped in a transformation file.
Please take an export of jms consumer in jdeveloper and reverse engineer the code of JMS COnsumer Service.
Envelope_To_ListOfSWIOrderIO is the xsl whcih converts the message in AIA Queue to a message in a SOAP. Please look into the transformation.
Thanks,
Venugopal sss Raja -
How to use shared variables with native c programs
Hello
What is the way to use shared variables with native c programs?
I have a c/c++ program that uses the NIDAQmx C-API to perform measurements. Now I want to communicate to a LabVIEW program via shared variables.
Is there a C-API for shared variables as there is for the NIDAQmx functionality? Where can I find further documentation? The document "Using the LabVIEW Shared Variable" mentions that one "can read and write to shared variables in ANSI C", but there are no hints about how and where to look.
Thanks in AdvanceHi user42,
with CVI 8.0, you cannot create or configure shared variables. However, you can read or write to an already configured LabVIEW 8.x shared variable from CVI using the DataSocket API.
In order to do this you need to have and DataSocket 4.3 or higher installed.
Here's a forum post about using the DataSocket functions a LabVIEW Shared Variables:
http://forums.ni.com/ni/board/message?board.id=180&message.id=24569&requireLogin=False
With CVI 8.1 and Measurement Studio 8.1 it's possible to use Shared Variables via the Network Varaiable Library (check out the end of the "Network-Published Shared Variable" section within the "Using the LabVIEW Shared Variable" documentation and the following link).
Datasocket with LabWindows/CVI and LabVIEW Real-Time:
http://digital.ni.com/public.nsf/allkb/CC4343488413A2F586256E6200099638?OpenDocument
Daniel
NIG -
How to call stored procedure with multiple parameters in an HTML expression
Hi, Guys:
Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
The orginal HTML expression is :
<img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
Thanks a lot.
SamHi:
Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
<img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
create or replace
PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
v_mime_type VARCHAR2(48);
v_length NUMBER;
v_name VARCHAR2(2000);
v_image BLOB;
v_counter number:=0;
cursor cur_All_Images_of_Offender is
SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
FROM sor_image
WHERE offender_id = p_n_Offender_id;
rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
BEGIN
open cur_All_Images_of_Offender;
loop
fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
v_counter:=v_counter+1;
if (v_counter=p_n_image_Count) then
owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
htp.p('Content-length: '||rec_Image_of_Offender.image_length);
owa_util.http_header_close;
wpg_docload.download_file (rec_Image_of_Offender.image);
end if;
exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
end loop;
close cur_All_Images_of_Offender;
END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
Thanks
Sam -
How to call a function with pl/sql
How does one call a function with pl/sql that uses a function?
Hi,
How does one call a function with pl/sql that uses a
function?I'm not sure what you mean.
In PL/SQL function can be used just about anywhere where an expression (with the same data type that the function returns). Arpit gave a very common example.
Here's another example, where all the functions take a single NUMBER argument and return a NUMBER, so they can all be used in places where NUMBERs are used:
IF fun_a (fun_b (0)) < fun_c (1)
THEN
UPDATE table_x
SET column_y = fun_d (2)
WHERE column_z = fun_e (ROUND ((fun_f (3), fun_g (4)));You call a function simply by using its name, followed by its argument list, if any.
If the function is in a package, you must call it with the package name, like "pk_foo.bar (1, 2, 3)", unless the call comes from within the same package.
If the function is owned by someone else, you must give the owner name, like "scott.bar (SYSDATE)" or "scott.pk_foo.bar (1, 2, 3)". You can create synonyms to avoid having to name the owner.
Maybe you are looking for
-
IBook G4 fails to boot with internal HD installed, works when removed
The short version: My iBook started failing to boot via any method (gray screen) and the boot menu (Option during startup) would freeze. Replaced HD, things were better. Six months into new HD, nearly the same symptoms appear again. Removed HD, now r
-
Aperture will no longer sync with itunes! Iphone 4, Itunes 10, iOS 4.1
This is very odd and bothersome. I have some 13K photos in Aperture 3, and have been successfully syncing a small subset of those with my iphone 4 via itunes 10. No problems mostly so far. Today I added a few photos to aperture, and then synced my ip
-
I just want to save a screen shot as a jpg/png file
-
I want download internal table to execle please help me . thanks every one.
-
Hi All, I am trying to export Webforms from Planning App. Hyperion Planning is installed on Linux. The command that I am trying to execute is: FormDefUtil export -all servername username password app_name I am trying this from the same directory wher