Use of variable in the For-Each statement
Hello gurus.I'm having a problem using a variable, I created in a statement for each. Here is the code I am using
My goal is to create a variable based on the type of Bill. If the invoice is a proof or a reprint, a copy should be printed. If it's a final bill, I need two copies.
<? xdoxslt:set_variable($_XDOCTX,_'x',_0)? >
for each<? If: Print_Additional_Header_Text_ID238 = "PROOF"? > <? xdoxslt:set_variable($_XDOCTX,_'x',_1)? > <? end if? >
<? If: Print_Additional_Header_Text_ID238 = "REPRINT"? > <? xdoxslt:set_variable($_XDOCTX,_'x',_1)? > <? end if? >
<? : otherwise (Print_Additional_Header_Text_ID238)? > <? xdoxslt:set_variable($_XDOCTX,_'x',2)? > <? end if? >
<? xdoxslt:get_variable($_XDOCTX,'x')? > <? for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)? >
foreach is the loop that I use to repeat sections of the Bill.
When I run with the last impression for each preview, I get an error that says "undefined variable: 'x'"»
But when I remove the last for each good variable, 1 or 2, will show in the invoice.
My question is: How can I use the variable 'x' in <? for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)? >
TIA
Darius
Published by: 852460 on May 24, 2011 08:31
Published by: DEK17 on July 20, 2011 13:15
Probably, this will help you
http://winrichman.blogspot.com/search/label/multiple%20copy
Try
or
Tags: Business Intelligence
Similar Questions
-
Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.
CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE
(
in_schema IN VARCHAR2,
in_tablename IN VARCHAR2,
in_datefield IN VARCHAR2,
)
RETURNS INTEGER
AS
-Declaring variables
v_is_true INTEGER.
BEGIN
SELECT
CASE
WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)
THEN 1
ON THE OTHER
0
END
IN
v_is_true
Of
in_schema.in_tablename
;
RETURN v_is_true;
END;
/
When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist
How to use the values of the input variables on the table select statement names?
Hello
Here's a way you can use dynamic SQL statements for this task:
CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE
(
in_schema IN VARCHAR2,
in_tablename IN VARCHAR2,
in_datefield IN VARCHAR2,
in_first_date DATE DEFAULT SYSDATE - 1,.
in_last_date DATE by DEFAULT NULL
)
RETURNS INTEGER
AS
-IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield
-contains all the dates in the in_first_date of the range through included in_last_date
- and it returns 0 if there is no such lines.
-If in_last_date is omitted, the search only the data on in_first_date.
-If in_first_date is omitted, it defaults to yesterday.
-Time parts of the in_first_date and in_last_date are ignored.
-Declaring variables
sql_txt VARCHAR2 (1000);
v_is_true INTEGER.
BEGIN
sql_txt: = 'SELECT COUNT (*).
|| 'FROM ' | in_schema | '.' || in_tablename
|| 'WHERE ' | in_datefield | ' > =: d1'
|| «AND» | in_datefield | '< > >
|| 'AND ROWNUM = 1';
dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE"); -For debugging
Sql_txt EXECUTE IMMEDIATE
IN v_is_true
With the HELP of TRUNC (in_first_date) - d1
TRUNC (NVL (in_last_date
in_first_date
)
) + 1 -- d2
;
RETURN v_is_true;
END is_ydaydata_to_table;
/
DISPLAY ERRORS
If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above. In this way, you can easily see exactly what will be executed. Comment out the call to dbms_output under test is completed.
Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future. For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days. The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).
-
Contains a drop-down list of this poplulates info for each State?
I created a drop down list of the 50 States of the United States. I need isolate only the information that is specific to each State in some way that it presents when a user selects the name of the State from the drop-down list. The information that will be displayed for each State can be a company name and address, or several different names/places. This should appear on a page in the web site of the client.
So I have two questions:
(1) can I create this list of drop function in LiveCycle for web utility?
(2) if so, I don't know where and how to start with hidden content or how it synchronize the State sectionals. Can someone point me in the right direction on how to accomplish this task?
Thanks in advance.
You can customize the table for your need. And the data can be in any order. It appears in the order by which you call upon the table.
Kind regards
Nith
-
Requirement of BEEP - sorting inside the for-each
Hi gurus,
I need to sort the PlanDateOpened to capture the Test B Business Unit because it is the oldest date, but it is inside the for each contact.
Please help me how this code to the BEEP.
A lot of thanks.
jP
Published by: BIPnewbie on Sep 8, 2011 01:29
Published by: BIPnewbie on Sep 8, 2011 20:26Can you send me your sample xml and RTF?
-
Use of Variables in the statement of sym.play(1000)
I built a system menu to a main menu with three options and a single submenu animation that should be limited to one of the three different places on the timeline, depending on which is click the main menu button.
For each button in the main menu, I created a click made up of sym.setVariable event ("Subselection","#" ""); in "#" can be set to 1, 2 or 3. When you click on one of the buttons on the main menu and the submenu opens at the end of this sequence, I inserted the following text - sym.play(1000) (subquery);
It is all quite clearly displayed in the snap-in to display annotated below.
It is important for me to master the use of variables and strings concatenated in the instruction of sym.play(1000) so I can create as compact as possible OAM files, so any help is greatly appreciated. My guess is that I am a stupid syntax error, but I am not opposed to picking the brains of others when mine is insufficient for the task at hand.
Thank you very much.
Andy.
Hi Harley,
Image labels are 1,2,3 etc.
sym.setVariable ("Subselection", 0); in the composition of the scene ready
Then in the menu, you can set the variable "Subselection" 1,2,3 and then call sym.play(1000) (sym.getVariable ("do"));
Thank you and best regards,
Roger Simon
-
Using variables in the command 'get-stat"powercli
Hello
I try to collect data via powershell and vsphere powercli I would like to pass several stat ID, both using variable that contains my ID stat list.
(1) when I do this...
Get-stat - entity (get-vmhost $host_id) - mem.active.average, sys.resourcecpuusage.average real-time stat - maxsamples 1
... It works very well
(2) when I do this...
$list = "mem.active.average".
Get-stat - entity (get-vmhost $host_id) - stat $list - realtime - maxsamples 1
... It works fine, I can pass variables and so ID stat, one at a time.
(3) when I do this...
$list = 'mem.active.average, sys.resourcecpuusage.average '.
Get-stat - entity (get-vmhost $host_id) - stat $list - realtime - maxsamples 1
... It does not work. PowerCLI returns... There is no entity the metric counter 'mem.active.average, sys.resourcecpuusage.average'...
I do not understand where the problem is during the passage of variables, an idea?
This should be
$list = "mem.active.average","sys.resourcecpuusage.average" get-stat -entity(get-vmhost $host_id) -stat $list -realtime -maxsamples 1
Must be an array of strings.
-
How to use text variables and the Image for printing
I work for several months on the product with AS3 Configurator.
I am not competent with AS3.
Now, it seems that perhaps my design is all wrong.
Is there a good way to do this?I have a main scenario that has video clips showing images of different options for the product.
On the first image, I use buttons to select the choice for option 1 of the Option1_mc.
Can I store the selection in a variable.
I use a button to go to the next choice (screen 10.)On frame 10, I use buttons to select the choice of option 2 in the Option2_mc.
It is stored in another variable.There are about 10 options that are selected and stored in variables.
Some are text values and other images taken from video clips Option instances.I made a Print_mc to use to printjob.
I can't get the values of the variables to display the first image for printing.Any helpl would be appreciated.
You are welcome.
you will not be able to insert a variable into a textfield. you are going to assign to the text of your TextField property set to one of your points of variables to.
Thus, for example, if you have:
var var1:String = 'this is a test ';
You can use:
TF. Text = var1;
-
Essbase - lead time for each statement in difficulty
Hello world
is there a way to monitor the execution of each statement to fix time in a business rule? I mean using a log file that returns the time as each statement of correction required for its calculation.
Thank you all ;)
Maurizio
Published by: MauriceFIX on 6-mar-2013 3.28You can take a look on the essbase application log, it is also useful to have a read of the following calculation
SET MSG - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?set_msg.html
NOTICE - the VALUE http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?set_notice.htmlSee you soon
John
http://John-Goodwin.blogspot.com/ -
The use of variables in the Calc scripts and business rules
I'm sure that there have been previous discussions on this topic, but can anyone let me know the benefits of using variables in scripts of Calc and BRs?
Thank you
AI've never used variable Calc and after reading a guide to the study, which has talked about them, I didn't really understand the benefits.
^ ^ ^ I use variables all the time to make difficult abstract formulas. Here is an example.
/* Declare variables */ VAR varSalaryCosts ; VAR varProdOHLabXXXX ; VAR varXXXX ; A whole bunch of code here along with very limited FIX statement and then... "Salaried Labor" ( varSalaryCosts = "Salary Costs"->"No Department"->"No Category"->"Salaried" - "Wage Bonus"->"No Department"->"No Category"->"Salaried" - "YYYY Retention Bonus 40%"->"No Department"->"No Category"->"Salaried" - "YYYY 60% Ret Bonus Accrual"->"No Department"->"No Category"->"Salaried" ; varProdOHLabXXXX = "Number of Employees"->"ZZZZDepartments"->"Codes"->"Salaried" + "Number of Employees"->"Blah Departments"->"Codes"->"Salaried" + "Number of Employees"->"Humph Departments"->"Codes"->"Salaried" + "Number of Employees"->"TTTT"->"Codes"->"Salaried" ; "Salaried Labor" = varSalaryCosts * ("Number of Employees"->"Salaried" / varProdOHLabXXXX) ; )
The last formula is how the formula was described to me by the owner of the company. I find it much easier to read something like:
"Salaried Labor" = ("Salary Costs"->"No Department"->"No Category"->"Salaried" - "Wage Bonus"->"No Department"->"No Category"->"Salaried" - "YYYY Retention Bonus 40%"->"No Department"->"No Category"->"Salaried" - "YYYY 60% Ret Bonus Accrual"->"No Department"->"No Category"->"Salaried") * ("Number of Employees"->"Salaried" / ("Number of Employees"->"ZZZZDepartments"->"Codes"->"Salaried" + "Number of Employees"->"Blah Departments"->"Codes"->"Salaried" + "Number of Employees"->"Humph Departments"->"Codes"->"Salaried" + "Number of Employees"->"TTTT"->"Codes"->"Salaried")) ;
I used the TABLE in a calc script really-cool-but-alas-not-invented-by-me do better than planning made the conversion of currency currency conversion in planning. (How's that for a run-on sentence?) It is one of the six blog posts that I'm trying and I will end it soon, I hope. I am now thrash mode. It doesn't have its uses and I'll try to remember to update this thread when I'm done.
Kind regards
Cameron Lackpour
-
Problems with the use of variables at the time of the SV - Loudness.vi
Hello
I'm rather new to Labview and will have questions, get my Time-Varying Loudness calcuations out correctly. Attached is my current VI and a .csv file of my data set (calibrated in PA. sampling frequency = 50 kHz for 5 seconds). It does not produce what I expected when I run the VI. Here are my questions:
Time-Varying Loudness:
(1) what are the signals so much? There are hundreds of lines, but I only expect one.
(2) why my category axis are not a range from 1 to 24 years as bark should be?
1/3 octave Band Analsysis:
(1) why is it incorrect? Them should not be a linear increase the frequency...
Data on the one hand be hurry and make a squeek. It is a transient noise that happens about 2 seconds. But, how could I go do a waterfall (Time (s), Frequency (Hz), Amplidtude (sones)) of this signal? Is there an easy way? or do I have to do all three signals and add to make a parcel?
Thank you very much for your help! Let me know if you need more infromation,
-Troy
p.s. I have included a picture of the results as well.
Hi Troy,
(1) the SV specific volume VI 'chunks' given in blocks of 2 ms and returns then these as individual plots specific Loudness vs. Sone. The colored lines that you see in your chart are representative of the 2 500 2 periods of time ms in your acquisition of five seconds. Each of these plots contains 241 points, however they are ten sample "gradually", one for each sone. The digital filter buffer takes a bit to fill and kick in properly, however, so you can give your first rows (0-. 02 seconds or more) scrutiny before using them - you can see a number of unexpected zeros around the lower sones.
2) since you use a chart, the x-axis will be increments every race following (the previous data is stored.) If you only want to display the most recent data, I would recommend switching to a chart, which is found in the chart controls palette. Also, see above (#1) why the x axis are longer than 24 points.
(3) remember that dB is a unitless measure and cannot be used in reference to another value. A typical reference for sound is 20 uPa, but you will probably need even out your data entry and determine/set dB reference. You can take a look at the voltage from the snout to the Cloaca EU.vi scale (EU means equalized units) and from the snout to the Cloaca Set dB reference.vi. In your case, I think the plot of Octave shows your dB from a default value of 1. The values should be accurate with respect to the other, but you must provide a reference value to calibrate the scale.
(4) I think that this VI is a good example how to do to create a cascade:
Display cascading for Octave (DAQmx)
http://zone.NI.com/DevZone/CDA/EPD/p/ID/5562
You will need to break up of your waveform into pieces, just like the specific volume VI, but the basic concept is roughly the same (take piece of waveform, take octave measure of the piece, add octave output measure cluster to cluster table, repeat for the rest of the waveform display)
Phew! It was a bit of information. Let me know if this makes sense and don't be intimidated by the detail and/or unknown functions or methods - you're definitely on the right track, or to ask it to at least the right questions.
-
Use of variable in the instructions of expression TestStand
I'm trying to implement the following:
Locals.tot_power = (Locals.reading + Locals.tot_power) 10th
as long as expression of TestStand, he does not accept the variable locals.reading for power exp. is it possible to do it somehow?
I guess that there is also another simple solution that is to use the Evaluate() function.
In the following example, Locals.MyNumber and Locals.Exp are numeric variables.E.g.:
Locals.MyNumber = evaluate (Val ("10F" + Str (Locals.Exp)))Roberto Piacentini
National Instruments
Technical sales engineer
www.NI.com/support -
Automing instruments LabVIEW without using specific and coding drivers for each instrument?
Hello
I'm new to programming in labVIEW, but I had a few questions about its use in automation and remote controlling several instruments.
It is an ideal software for automation of various instruments remote control/test. Assuming that I have several different companies spectrum analyzers, I understand that labVIEW drivers of instruments or special VI who would control these instruments. But if I wanted that all these spectrum analyzers to say, to display on another computer using the remote control, but I wanted to use the same program for effeciency, is it possible to do so universally for all instruments using labVIEW? Or do I have to adapt this program for each instrument to instrument drivers cause?
If labVIEW can do that, is - anyone had good success for such scenarios in other programming languages?
Thanks in advance for your help.
Look for the Abstraction Layer material (that you can implement with LabVIEW, even if it's a slightly advanced topic).
The idea of having a specific Test and be able to enforce it against different Instruments, decided at run time, is the kind of situation that LabVIEW and use of HALs was designed to facilitate.
The concept is to 'Levels of Abstraction'. When you create a test, you can design it for an abstract Framistan, since all the Framistans are supposed to be able to measure Vorbels in the range of 0 to 100, so you just plug a generator of Vorbel to generate Vorbels in a certain sequence of Test (linear, random, quickly, slowly, pulsatile, continuous, you decide), measure your Abstract Framistan records readings and compare with the results you expect write the results in a nice report.
Of course, Framistat of OR uses Ethernet as the means of communication, while HP uses a serial port (depending on the model, series settings can change) and uses of the Intel one. DLL to communicate with the low-level API. So you also need to develop, for each specific instrument, an "interface" between its API and the Framistan abstract (not everyone uses Vorbels as the input unit, for example).
So the good news is that it can be done, the bad news is that one of the best ways of handling this type of question on the programming is to use OOP (OOP). A number of languages (LabVIEW, C++, JAVA) support OOP, but LabVIEW might have the advantage when it comes to interact with the material.
I you are looking for Hardware Abstraction Layer? Add LabVIEW to the search query and you should find some nice presentations by Elijah Kerry...
Bob Schor
-
Use a variable in the paragraph in PL/SQL
Hello
Please let me know how to use variable in the PL/SQL Select query clause.
[code]
create or replace PROCEDURE emp
2 EAST
emp_id 3 VARCHAR2 (1000);
4 BEGIN
emp_id 5: = '1989100351, 1989100352, 1989100354';
6 - emp_id: = '1989100351';
7 FOR rec IN (select employee_id of employee emp_id WHERE employe_id IN)
8 LOOP
9 dbms_output.put_line (rec.employee_id);
10 END OF LOOP;
11 END emp;
12.
DISPLAYS THE ERROR MESSAGE;
Created procedure.
[email protected]/ICSN - SQL > no errors.
[email protected]/ICSN - SQL > EXEC emp;
BEGIN emp; END;
*
ERROR on line 1:
ORA-01722: invalid number
ORA-06512: at "emp", line 7
ORA-06512: at line 1
[/ code]
You cannot use pl/sql variable with values separated by commas in the paragraph directly, you must break into multiple records
Try this too [g 11]
create or replace PROCEDURE emp
IS
emp_id VARCHAR2 (1000);
BEGIN
emp_id: = '1989100351, 1989100352, 1989100354';
FOR rec IN (select employee_id from employee WHERE employe_id IN ())
Select (column_value) .getnumberval)
from xmltable (emp_id)) double.
)
LOOP
dbms_output.put_line (Rec.employee_id);
END LOOP;
END emp;
/
-
Using a variable db link for interactive report
I have a requirement where users select an instance a LOV apex (link db) and data in an interactive report query based on the selected db link.
I use a db link in a report query interactive but only if I provide the exact name of the binding. If I'm doing something link select * from foo@:P12_DBLINK it does not work.
It seems that my only option is to use something like apex_collection.create_collection_from_query and then I can build my dynamic SQL query and use a variable for the name of dblink. Then I create just a from IRR of my collection.
This sound correct approach like that or am I missing something?
Any suggestions are most appreciated,
John
Hi John,.
Why not create a classic report based on a function of PL/SQL returns a query.
André
-
Using of Variable in the filter expression will not scan.
IN ODI 11.1.1.3.0, I've defined a Variable of type 'Alphanumeric' (SelectionDate), default = January 1, 1970 with the query select: select to_char (SYSDATE, 'DD-MON-YYYY') of double.
I intend to use this variable as a scenario (parameter) variable that receives a value in the form "DD-MON-YYYY', of the execution environment.
I refreshed the variable and the value received June 16, 2011 (current date). So far so good.
Then, I defined an Interface and use the variable in a filter expression:
Filter active: checked
Tab implementation:
SOURCE_VIEW. SELECTION_DATE BETWEEN TO_DATE (' #PROJECT1.) SelectionDate', 'DD-MON-YYYY') AND (TO_DATE (' #PROJECT1.)) SelectionDate', 'DD-MON-YYYY') + 1).
Run on: Source
During the verification of the expression (click the check mark in the application tab) I always get: Expression is not valid for the DBMS. java.sql.SQLDataException: ORA-01858: a non-digit character was found here where was waiting for a digital.
I can't filter to analyze. Thank you for your ideas of what could be wrong.
Jose.Hi Jose,
You must set this variable in a package and refresh it. Then place your interface with the current filter condition.
Run the package. It should work.Thank you
Fati
Maybe you are looking for
-
My menu bar no longer appears, and I don't know why. No, I do not have full screen open, it shows not only purely. The place where the menu bar is supposed to be is not there.
-
How do I properly fill my Airport Extreme to my Time Capsule?
I'm trying to set up an Airport Extreme as a bridge to my Time Capsule via ethernet, so I can extend the range of my network. However, when I followed: https://support.apple.com/en-us/HT204616 I didn't see an option to "Share a public IP address" bec
-
I'm going to set up a customer to receive emails of a service request form online... He of not tech saavy and wants that all incoming emails to print to the printer on arrival. When he arrives at the end of the day, he wants a stack of emails/forms,
-
Why my computer always says inadmissible whenever I go to any site etc. email another site
everything I try and make my system stops and says whats failing upward with who? This is a whole new system
-
Brand new T440s with BIOS password
Hello I have a big problem. I bought online a new T440s I opened the box for the first time myself. When I go into the BIOS it asks for password and I just hit enter without entering a password. I can get into BIOS but I can't change any settings. Wh