Local variable in Data Form

Hi All,
I have a dataform in which Entity Dim is in Page. In a Business Rule attached to it there is a variable which should contain the value what ever selected in Entity in Page. Now my issue is what settings i should give while making Entity as local variable in BR in EAS.
What should i give in
Type: It has Members, Dimension, String, Integer, Real etc (I tried with Members & Dimension)
Usage Type : It has Saved Selection, Use by Value, Run-time prompt (I tried with all options)
Please give your inputs.
Thanks

Yes i am on version 11.1.2
I am running BR on save of data in Dataform.
I have not set any limits
I have declared a global variable with Member as type and Usage Type as "RTP"
Please let me know if i need to give any default value. My understanding should be no.<
Let me know if i need to click on check box saying "Do not save value entered during validation and launch as default value". My understanding - doesnot matter.<After that the global variable is appearing in BR
Let me know if i need to select checkbox for Hide. My Understanding should be yes<Thanks

Similar Messages

  • Multiple substitution Variable in Data Forms

    Hi,
    i have a problem with the creation of a hyperion Planning Data Form.
    I have created a Substituion Variable with "three" values delimited with a comma.
    I note that it works fine in the calculation script but i've a problem during the creation of a data form when I select the members by this substitution variable and it works fine if i set the Sub Var with only element.
    It's not possible to open the Data Form and The error is:
    "A substitution variable required for this calculation is undefined."
    Can someone help me for this error?
    Thanks
    Eugenio Gualtieri

    Hi,
    I don't think it is possible to put multiple members into a sub var for planning. It will treat it as a member e.g. if you had a subvar &years=FY08,FY09 it will be looking for a member named FY08,FY09.
    In your case you have to split into seperate subvars.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Replacement string variable in data form

    Hi everybody,
    in Planning 11.1.2, is it possible to set a replacement variable, with type String, and then use it in a data form to let the user inserting a string value (i.e "actual")?
    I need to reuse the value inserted in a business rule. I think to use the @MEMBER to refrence it to the corresponding dimension member.
    For example:
    If I define a string variable named SCENARIO and the user insert in the data form "actual", can i reference it in a cross-dimension:
    Account1->Peiod1->Fy12 -> @MEMBER(SCENARIO)
    does this cross-dimension return the value corresponding to Account1->Period1->FY12->Actual?
    Thank All
    Maurizio

    Why you just don't use RPT with type Member ?
    Users chose member name from the LOV (no chance for mistake) and run your rule

  • Create Local Variable in Custom.pll

    Hi,
    I want to create and calling local variable in custom.pll. As i know, we can create local variable with personalization form. but i didn't find the way to create local variable in custom.pll.
    Is there any way to create local variable in custom.pll and calling that variable ?
    Thanks

    I think what you want is to create a GLOBAL variable, a LOCAL variable would be available to the Procedure/Function being executed.  But to create the local variable, you add it between the Function/Procedure declaration and the begin
    PROCEDURE abc(p_input    VARCHAR2);
      v_count       NUMBER := 0;
    BEGIN
    END;
    A GLOBAL reaches out past the execution of the proc defined in CUSTOM.pll.  You can simply type GLOBAL.<var_name> := <value>.
    BEGIN
      GLOBAL.xx_count := 0;
    END;
    Though I like the ability Personalizations give you of using Init Value vs. Value,  Init Value will assign a value if the variable does not exist ... and creates it.  Value just assigns a value.
    Some say you have do a COPY(value, NAME_IN('variable name')) instad of GLOBAL.<variable_name>, I have never had to use this.

  • Data Acquisition - using local variables to write data to a file

    Hello,
    I am running a Data Acquisition vi (currently in LabVIEW 7.1 but soon to be updated to 8.2) that collects ~100 parameters of data from several sources contained in a while loop. The current configuration (which I did not write) uses very few subVIs and writes to ~100 local variables to store each parameter. It then reads all the local variables and builds an array of all the strings, converts then to a spreadsheet string, then uses the write characters to file function to append to a datafile. I am trying to clean things up and have came up with subVIs to collect the data from the following sources:
    8 serial port sources collecting btwn 8 and 20 parameters each
    ~15 thermocouple readings
    ~10 analog inputs
    ~20 parameters read off an ARINC 429 bus.
    I have come up with a subVI to read each of the sources and have placed the subVIs in the while loop. Each subVI outputs the data that it collects in array or cluster form. I was wondering how best to write each parameter to a CSV file at between 1 and 10 Hz. Should I write each subVI output to a LV and then read them off as was done before (the difference being that I have reduced the # of LVs to ~10 vs >100?
    I should add that precise timing is not that important, so if all the subVIs are not collecting simultaneously (which I understand that they won't be), it does not really matter.
    Thanks.

    Hi jilla,
    jilla wrote:
    What I think that you are saying is to turn the outputs of the 4 subVIs into inputs of a 5th subVI that writes to the data file. Correct?
    Yes.  It may sound like a fine-point, but I beileve it's better to create a VI specifically for formatting data - in your example, 4 arrays IN, a single string OUT.  Then write the string to file as a seperate operation.  GUI-displayed data can go through a similar transformation, the four arrays wired to a subVI which builds output-structures specifically for display.  It's a beginner's mistake to put lots of individual controls and indicators on the screen when groups of them are naturally related (in an object-oriented sense.)  Use clusters to group related controls - this will keep the diagram much cleaner.
    One more question: at what point (either # of data points or frequency of data collection) does it become necessary to use queues? Thanks.
    Well, there's not really a clearly definable "point".  I'd say if your update-rate climbs above 100Hz, or you witness poor program or system performance, then it's time.  The scenario you've described is a fairly simple acquire/display&log loop - and simple is good.   Then-again people can't see/react-to updates faster than about 10Hz - so it doesn't make sense to sacrifice performance - if performance becomes an issue.
    Re: queues:  Queues are sometimes used to buffer data that's "produced" in one place and "consumed" in another.
    Here, if/when logging data, you're logging with every DAQ.  I wouldn't recommend using a queue to transport data from a "DAQ loop" to a "Logging-loop" - those functions can be in the same loop.  Should/could a queue be used to get data from a "DAQ loop" to update the GUI at a lower frequency?  Sure, but a Notifier might be a better choice.   Further, in the (simple?) program you've described, you might use a case structure (True/False) to only update FP indicators every "X" iterations - a simple solution that doesn't require Queues or Notifiers.
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • How can I Change data in a type def control containing a Xcontrol with a local variable

    Hello
    I made a Xcontrol and I inserted this control in a type def.
    When I want to change the control's data with a local variable in a VI, the VI change nothing. The change of data isn't perform
    How can I correct this issue?
    Thanks for your help
    Solved!
    Go to Solution.

    Hello,
    What's your LabVIEW version ? Do you have a simple example program which demonstrates this behavior ?
    I found another discussions related to your issues with Xcontrols:
    updating type defs in Xcontrol Facade
    No Data Change event generated for a XControl in a Type Def
    XControl facede.vi 
    Hope this helps.
    Regards, 
    Steve M.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Vidéo-t'chats de l'été : présentations techniques et ingénieurs pour répondre à vos questions

  • Inserting in the UUT_Results table a value that we read from our data base from a local variable

    We would like to include in the UUT_Results table a value that we read from our data base into a local variable during the execution of our sequence file. We found that by modifying the configure database options we were able to add a column for this variable, but the local variable was not available to be placed into an expression for that column from the local variables or parameters. Is it possible to do this, and if so, how? Station Globals were available to be included in the expression, however the sequence file may be executed on more than one system which makes the Global unavailable on systems other than the one where the sequence file originated.

    You can use the TestStand API to programmatically create global variables at runtime, thus ensuring their existence. For example, you could call Engine.Globals.SetValString("GlobalStringVariableName", PropOption_InsertIfMissing, "variable value")
    Of course, if you need to test multiple UUTs in parallel, a single global is not sufficient. In that case you might consider adding the field you need to the UUT datatype in the process model. You could then access the field in your sequence via RunState.Root.Locals.UUT.YourNewField = YourNewValue.
    If you also want your sequence to run without using a process model, you must check for the existence of the UUT before accessing it. You could use the expression function: PropertyExists("RunState.Root.Locals.UUT.YourNewFi
    eld")

  • What is it about data types of local variables?

    Hey there!
    I'm trying hard to access the booleans, whose refnums got stored into an array. As the example show, everything's fine unless I start using local variables: I can access the data in the topmost FOR loop. As soon as variables come into play, it seems as if I have to explicitly typecast the data. Is it just me? There has to be a less complicated way... can anybody give me a hint?
    Kind regards,
    Severin
    Attachments:
    data types of local variables.jpg ‏96 KB
    data types of local variables_7.11.vi ‏39 KB

    Hi Severin,
    The output from that property node is of variant data type. You can convert it to boolean by using the Variant to Data VI. See attached example
    Sarah
    Applications Engineer | National Instruments | UK & Ireland
    Attachments:
    data types of local variables_7.11.vi ‏41 KB

  • Private data members vs. local variables

    Hi
    This is more of a basic design question.
    I have a code that retrieves a lot of data from a text file and puts them into the database. I have one function per table for inserting rows which are called from various functions in the code. I have all the functions (calling and called) in the same java class.
    The number of variables that are needed to hold the data are approx 40. I was thinking if I should have them as class variables and update them and just access the values in the functions where I do the database updates or should I have them as local variables and pass them when a function is being called. Or should I be putting them into some data structure and pass the data structure.
    I want to know which method would be memory efficient and would not hurt the performance of my code.
    Please do let me know your valuable opinions.
    I would greatly appreciate any thoughts on this.
    Thanks

    I would strongly advice against using fields as a way to get around long method invocations.
    For one thing, it's not using fields as object state.
    Second, it's a really good source for bugs. I've seen it happen. The "bucket" fields (to coin a phrase; I mean fields used to bypass long argument lists) become messy, unreliable data, and next thing you know some method is breaking other methods. This becomes especially dangerous when there's multithreading, but you don't need multithreading to get bugs from this.
    If you have a lot of values you need to pass around, then two possibilities occur to me. One is that these values are configuration data, in which case they probably do qualify as object state and maybe you can use fields. The other possibility is that you need to refactor your code; all those values may need to live in one or more new classes that you need to write. Another refactoring may be the order in which you perform the steps in your algorithm.

  • Issue with local variable in forms personalization

    Hi All,
    I did the following things at last it is give me syntax error, please help me on this.
    Rules section:
    seq Description Level Enabled
    1 Populate Number Function y
    Conditions:
    T.E : When new item instance
    T.O : REQ_LINES.REQUISIOTN_NUMBER
    Condition::REQ_LINES.BLANKET_PO_NUM_DSP IS NOT NULL AND
    :REQ_LINES.SELECT_LINE='Y'
    Processing mode: Not in enter query mode
    Actions:
    seq: Type: Desc: Langauge: Enabled
    1: property: local variable :Y
    Object Type: Local Varibale
    Target Object: XXNUM
    property : Value
    Text: = TO_CHAR(${item.req_lines.blanket_po_num_dsp.value})
    Rules section:
    seq Description Level Enabled
    1 Default Number Function y
    Conditions:
    T.E : When block instance
    T.O : New_DOCUMENT
    Condition:
    Processing mode: Not in enter query mode
    Actions:
    seq: Type: Desc: Langauge: Enabled
    1: property: use of local variable :Y
    Object Type:ITEM
    Target Object:NEW_DOCUMENT.DOCUMENT_NUMBER
    property : Value
    *Text:  = SELECT TO_CHAR (${var.XXNUM.value}) from dual*
    The line which i bold shows me an syntax error, please check the syntax and if it is wrong please correct it.
    Thanks and Regards
    Zaheer
    Edited by: zaheer on Feb 10, 2010 11:25 PM
    Edited by: zaheer on Feb 10, 2010 11:25 PM

    Hi Zaheer,
    Try using this:
    Actions:
    seq: Type: Desc: Langauge: Enabled
    1: property: use of local variable :Y
    Object Type:ITEM
    Target Object:NEW_DOCUMENT.DOCUMENT_NUMBER
    property : Value
    Text: = ${var.XXNUM.value}
    PS: You might get a message while validating, but you can ignore that.
    Regards,
    Sujoy

  • Variables in the form of From-To dates .

    Can any one of you explain me how to get the variables From-To dates .
    I mean to say for Example  <b>award data 02/02/2006 to 03/04/2006.</b>
    Thanks in Advance.
    Vasu.

    hi Vasu,
    not clear with your question,
    do you mean how to create variable with date interval ?
    you can try from query designer, create variable, from characteristic expand, and right click the variable, 'new variable', give name and description, choose processing type 'user entry/default value', in next screen choose 'interval' for variable represents.
    hope this helps.

  • Local variable needs to be declared final

    This is the error code I am getting:
    C:\javacode\Notepad>javac FinalProgram.java
    FinalProgram.java:60: local variable textfield1 is accessed from within inner class; needs to be declared final
    System.out.println("It is detected " + pressed +
    textfield1);
    ^
    1 error
    Here is my code:
    comments relevant to this topic are //ALL IN CAPS
    import java.awt.*; //declare packages needed
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.JMenuBar;
    public class FinalProgram extends JFrame
        implements ActionListener {
    static JFrame frame;
      public void actionPerformed (ActionEvent e) {
          String answer = (e.getActionCommand());
             if (answer == "Get Data") {
              JInternalFrame iFrame = new JInternalFrame("Get Data . ", false, true, false, false);
              iFrame.setLayout(new GridLayout(8,2));
              JLabel label1 = new JLabel("First Name");
              JLabel label2 = new JLabel("Last Name");
              JLabel label3 = new JLabel("Street");
              JLabel label4 = new JLabel("City");
              JLabel label5 = new JLabel("State");
              JLabel label6 = new JLabel("Zip");
              JLabel label7 = new JLabel("Phone");
              JLabel label8 = new JLabel("Click Button to Submit Form -->");
              JTextField textfield1 = new JTextField(10);
              JTextField textfield2 = new JTextField(10);
              JTextField textfield3 = new JTextField(10);
              JTextField textfield4 = new JTextField(10);
              JTextField textfield5 = new JTextField(10);
              JTextField textfield6 = new JTextField(10);
              JTextField textfield7 = new JTextField(10);
              JButton button1 = new JButton("Submit Data");
              //textfield1.addActionListener(this);
              textfield1.addActionListener(this);
              textfield2.addActionListener(this);
              textfield3.addActionListener(this);
              textfield4.addActionListener(this);
              textfield5.addActionListener(this);
              textfield6.addActionListener(this);
              textfield7.addActionListener(this);
              button1.addActionListener(new ActionListener() { //start button1.addActionListener
              public void actionPerformed(ActionEvent a) { //start button1 actionPerformed
                        String pressed = ((JButton) a.getSource()).getText();
                        System.out.println("button press is detected " + pressed + textfield1);  //THIS SYSTEM OUT PRINT IS A TEST, IT WORKS WHEN I DON'T HAVE THE "+ textfield1" PART, IT GIVES ME THE ERROR MESSAGE POSTED ABOVE ABOUT DECLARING IT FINAL.
    I'M A BEGINNER, MY GOAL HERE, IN EASY ENGLISH, IS TO GRAB THE DATA FROM EACH TEXTFIELD AND STORE THEM IN VARIABLES, OR MORE IDEALLY IN AN ARRAY SO THAT THE REST OF MY CODE BELOW CAN WRITE THEM TO FILE, I'VE BEEN TRYING THE PAST FEW DAYS ON THIS EXPERIMENTING AND ANY SUGGESTIONS WOULD BE APPRECIATED
              try {
                   String directoryName = "c:\\javacode\\Notepad";
                   String fileName = "program.txt";
                   File output = new File(directoryName,fileName);
                   output.createNewFile();
              if (! output.isFile()) {
                   System.out.println("File creation of" + output.getPath() + "failed");
            return;
              BufferedWriter out = new BufferedWriter(new FileWriter(output.getPath(), true));
              String[] text = {"This is the text that will be written. \r", //we pass an array, which holds the text to append to the file
                    "The text will be written to the file \r",
                    "in append mode. If the file does not \r",
                    "exist it will be created.\r"};  //WHAT YOU SEE HERE IS JUST A TEST, IN PLACE, I WOULD LIKE TO HAVE THE INFORMATION FOR MY TEXTFIELDS SO THAT I CAN PASS THEM THROUGH A FOR LOOP AS BELOW AND WRITE DATA FOR EACH OF THE TEXTFIELDS TO MY EXTERNAL TEXT FILE
                    for(int i = 0; i < text.length; i++) { //using the length of the text message we use out.Write() to write out the data.  Notice that all of the code is placed into a try-catch block so we can check for any IOExceptions that occur
           out.write(text[i] + "\n");
              //Here I create the code to grab the actions(grab the text) from the textFields and store them into variables OR into an array
              //after I have created my container to hold the information for my various textFields, then I want to create a for loop to go through each textField and write that information to a text file, separating each textField on its own line
         out.close();
         catch(IOException d) {
         System.out.println("Error writing to file " + d);
                   }  //end button1.addActionListener
              }  //end button1 actionPerformed
              );     //end actionListener statement     
              //textfield1.setSize(10, 10);
              iFrame.add(label1);
              iFrame.add(textfield1);
              iFrame.add(label2);
              iFrame.add(textfield2);
              iFrame.add(label3);
              iFrame.add(textfield3);
              iFrame.add(label4);
              iFrame.add(textfield4);
              iFrame.add(label5);
              iFrame.add(textfield5);
              iFrame.add(label6);
              iFrame.add(textfield6);
              iFrame.add(label7);
              iFrame.add(textfield7);
              iFrame.add(label8);
              iFrame.add(button1);
              iFrame.setSize(200, 500);
              iFrame.setVisible(true);
              add(iFrame);
              if (answer == "Display Data") {
              JInternalFrame iFrame = new JInternalFrame("Display Data . ", false, true, false, false);
              JTextArea text = new JTextArea();
              JScrollPane scroller = new JScrollPane();
              scroller.getViewport().add(text);
              iFrame.getContentPane().add(scroller);
              iFrame.setSize(200, 150);
              iFrame.setVisible(true);
              add(iFrame);
      public FinalProgram() {
        super ("Menu Example");
        JMenuBar jmb = new JMenuBar();
        JMenu file = new JMenu("Functions");
        JMenuItem item;
        file.add(item = new JMenuItem("Get Data"));
        item.addActionListener (this);
        file.add(item = new JMenuItem("Display Data"));
        item.addActionListener (this);
        jmb.add(file);
        addWindowListener(new ExitListener());    
         setJMenuBar (jmb);
        public static void main(String[] args) {
            FinalProgram window = new FinalProgram();
            window.setTitle("Final Program");
            window.setSize(600, 600);
            window.setVisible(true);
    }

    hi,
    Updated Code,
    import java.awt.*; //declare packages needed
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.JMenuBar;
    public class FinalProgram extends JFrame
        implements ActionListener {
    static JFrame frame;
              JLabel label1 = new JLabel("First Name");
              JLabel label2 = new JLabel("Last Name");
              JLabel label3 = new JLabel("Street");
              JLabel label4 = new JLabel("City");
              JLabel label5 = new JLabel("State");
              JLabel label6 = new JLabel("Zip");
              JLabel label7 = new JLabel("Phone");
              JLabel label8 = new JLabel("Click Button to Submit Form -->");
              JTextField textfield1 = new JTextField(10);
              JTextField textfield2 = new JTextField(10);
              JTextField textfield3 = new JTextField(10);
              JTextField textfield4 = new JTextField(10);
              JTextField textfield5 = new JTextField(10);
              JTextField textfield6 = new JTextField(10);
              JTextField textfield7 = new JTextField(10);
              JButton button1 = new JButton("Submit Data");
      public void actionPerformed (ActionEvent e) {
          String answer = (e.getActionCommand());
             if (answer == "Get Data") {
              JInternalFrame iFrame = new JInternalFrame("Get Data . ", false, true, false, false);
              iFrame.setLayout(new GridLayout(8,2));
              //textfield1.addActionListener(this);
              textfield1.addActionListener(this);
              textfield2.addActionListener(this);
              textfield3.addActionListener(this);
              textfield4.addActionListener(this);
              textfield5.addActionListener(this);
              textfield6.addActionListener(this);
              textfield7.addActionListener(this);
              button1.addActionListener(new ActionListener() { //start button1.addActionListener
              public void actionPerformed(ActionEvent a) { //start button1 actionPerformed
                        String pressed = ((JButton) a.getSource()).getText();
                        System.out.println("button press is detected " + pressed + textfield1.getText()); 
              try {
                   String directoryName = "c:\\javacode\\Notepad";
                   String fileName = "program.txt";
                   File output = new File(directoryName,fileName);
                   output.createNewFile();
              if (! output.isFile()) {
                   System.out.println("File creation of" + output.getPath() + "failed");
            return;
              BufferedWriter out = new BufferedWriter(new FileWriter(output.getPath(), true));
              String[] text = {"This is the text that will be written. \r", //we pass an array, which holds the text to append to the file
                    "The text will be written to the file \r",
                    "in append mode. If the file does not \r",
                    "exist it will be created.\r"};  //WHAT YOU SEE HERE IS JUST A TEST, IN PLACE, I WOULD LIKE TO HAVE THE INFORMATION FOR MY TEXTFIELDS SO THAT I CAN PASS THEM THROUGH A FOR LOOP AS BELOW AND WRITE DATA FOR EACH OF THE TEXTFIELDS TO MY EXTERNAL TEXT FILE
                    for(int i = 0; i < text.length; i++) { //using the length of the text message we use out.Write() to write out the data.  Notice that all of the code is placed into a try-catch block so we can check for any IOExceptions that occur
           out.write(text[i] + "\n");
              //Here I create the code to grab the actions(grab the text) from the textFields and store them into variables OR into an array
              //after I have created my container to hold the information for my various textFields, then I want to create a for loop to go through each textField and write that information to a text file, separating each textField on its own line
         out.close();
         catch(IOException d) {
         System.out.println("Error writing to file " + d);
                   }  //end button1.addActionListener
              }  //end button1 actionPerformed
              );     //end actionListener statement     
              //textfield1.setSize(10, 10);
              iFrame.add(label1);
              iFrame.add(textfield1);
              iFrame.add(label2);
              iFrame.add(textfield2);
              iFrame.add(label3);
              iFrame.add(textfield3);
              iFrame.add(label4);
              iFrame.add(textfield4);
              iFrame.add(label5);
              iFrame.add(textfield5);
              iFrame.add(label6);
              iFrame.add(textfield6);
              iFrame.add(label7);
              iFrame.add(textfield7);
              iFrame.add(label8);
              iFrame.add(button1);
              iFrame.setSize(200, 500);
              iFrame.setVisible(true);
              add(iFrame);
              if (answer == "Display Data") {
              JInternalFrame iFrame = new JInternalFrame("Display Data . ", false, true, false, false);
              JTextArea text = new JTextArea();
              JScrollPane scroller = new JScrollPane();
              scroller.getViewport().add(text);
              iFrame.getContentPane().add(scroller);
              iFrame.setSize(200, 150);
              iFrame.setVisible(true);
              add(iFrame);
      public FinalProgram() {
        super ("Menu Example");
        JMenuBar jmb = new JMenuBar();
        JMenu file = new JMenu("Functions");
        JMenuItem item;
        file.add(item = new JMenuItem("Get Data"));
        item.addActionListener (this);
        file.add(item = new JMenuItem("Display Data"));
        item.addActionListener (this);
        jmb.add(file);
        addWindowListener(new ExitListener());    
         setJMenuBar (jmb);
        public static void main(String[] args) {
            FinalProgram window = new FinalProgram();
            window.setTitle("Final Program");
            window.setSize(600, 600);
            window.setVisible(true);
    class ExitListener extends WindowAdapter {
      public void windowClosing(WindowEvent event) {
        System.exit(0);
    }

  • How do i declare a user defined table type sproc parameter as a local variable?

    I have a procedure that uses a user defined table type.
    I am trying to redeclare the @accountList parameter into a local variable but it's not working and says that i must declare the scalar variable @accountList.this is the line that is having the issue: must declare the scalar variable @accountListSET @local_accountList = @accountListALTER PROCEDURE [dbo].[sp_DynamicNumberVisits] @accountList AS integer_list_tbltype READONLY
    ,@startDate NVARCHAR(50)
    ,@endDate NVARCHAR(50)
    AS
    BEGIN
    DECLARE @local_accountList AS integer_list_tbltype
    DECLARE @local_startDate AS NVARCHAR(50)
    DECLARE @local_endDate AS NVARCHAR(50)
    SET @local_accountList = @accountList
    SET @local_startDate = @startDate
    SET @local_endDate = @endDate
    CREATE TYPE [dbo].[integer_list_tbltype] AS TABLE(
    [n] [int] NOT NULL,
    PRIMARY KEY CLUSTERED
    [n] ASC
    )WITH (IGNORE_DUP_KEY = OFF)
    GO

    Why are you asking how to be an awful SQL programmer??  Your whole approach to SQL is wrong.
    We have a DATE data type so your insanely long NVARCHAR(50) of Chinese Unicode strings is absurd. Perhaps you can post your careful research on this? Can you post one example of a fifty character date in any language? 
    The use of the "sp_" prefix has special meaning in T-SQL dialect. Good SQL programmers do not use CREATE TYPE for anything. It is dialect and useless. It is how OO programmers fake it in SQL. 
    The design flaw of using a "tbl-" prefix on town names is called "tibbling" and we laugh at it. 
    There are no lists in RDBMS; all values are shown as scalar values. First Normal Form (1NF)? This looks like a set, which would have a name. 
    In any -- repeat any -- declarative programming language, we do not use local variables. You have done nothing right at any level. You need more help than forum kludges. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Running Business Rules with global Variables in Composite Forms

    Hi,
    I am having trouble running Business Rules, that include Global Variables, in composite forms.
    I have two forms in the composite form, both have entity in Page dimension set to 'local'. one includes entities at level 3 and the other has entities at level 0. I need to pass this level 0 entity to the business rule, from the form.
    When i try to run the rule, it gives me the following error:
    "This rule cannot be launched because it has hidden rtp variables without default values "
    I get this error even when i set the default value for the global variable.
    This rule runs perfectly when run from the individual form (which is part of the composite form).
    Please help.
    Thanks.

    Known Issue: 9900514
    The Use Members on Data Form and Hide Prompt options for business rules attached to composite data forms apply only for runtime prompt values from the globally shared pages and POVs of a composite data form. In other words, this will only use members that are shared across all component data forms. If users want a business rule to take context from a single component data form, they should attach the business rule to that component data form and include the business rules for that component data form at the composite data form level (<Business rules for componentX>).
    Please let me know if this is not what we are talking about.
    Thank you,
    Todd Rebner

  • Local Variables Versus Global Variables

    DATA A TYPE I VALUE 100.
    PERFORM PRINT_DATA.
    FORM PRINT_DATA.
               DATA A(10) TYPE C 'HELLO'.
               WRITE / A. "Wanted to Print 100 (Global)
               WRITE / A.  "Wanted to Print 'HELLO'(Local)
    ENDFORM.
    Note : Both the times, the Local Variable 'A' is Printed .
    ?Is there any way to   Differentiate the Local and Global Variables When the Names Are Same.*
    *It Might be Possible in Object Oriented But I am Looking for the Same in FORMs.

    Hello Gagan,
    You want to print the Global as well as the local values of the variable named "A". Here are a couple of approaches:
    1.The 'Subroutines' are part of the modularization techniques. There are certain keywords like "using" & "Changing" so that you can work by passing Values.
    2. There is a keyword named "LOCAL". Declare data object with the keyword "LOCAL" and then try the 'write" statement. I suppose this should work for you.
    Let me know if any one of the above works or if you need more help.
    Best Regards,
    Chaitanya

Maybe you are looking for

  • Open pdf in IE using #toolbar = 0 does not display read mode menu

    I m trying to open up a pdf document using IE 9 and Adobe Reader XI and if I have the toolbar hidden the first time the document displays the read mode menu bar does not display.  I have to refresh the browser to get the read mode menu to display. Ho

  • Problem with max function

    Can anybody help me in using MAX(extents_id) in the following query. What is there is wrong, I know. Does anybody know the correct usage? select max(extent_id) as select seg.owner, seg.segment_type, seg.segment_name from dba_extents ex, dba_segments

  • File Chooser in Flex

    I want to make a file chooser that can allow me to choose (Browse) where's the file that i want to upload. Anyone know how to create a file chooser with flex builder 2 ? I'm very appreciate for any answer.

  • Droid Razr M Maps issue?

    I've have a Droid Razr M since about Feb.  Just recently the Maps apps has been acting very poorly.  Lots of glitching, flickering and issues while using it.  Has anyone else been experiencing this?  Is it my phone?  I've got the OS up to date and th

  • My ichat not working

    since this afternoon, my ichat not working in my macbook pro, the error massage is as below, yet the ichat on my iphone also not working