Script IF condition problem

Hi experts
data var type i value 10. defined in print program,
i wrote a text element in scrpt form
/E ELE
/: IF &VAR&  EQ 10
welcome
/: ELSE
bye
/:ENDIF
called in write_form
Output : bye
why it executes else part, please help me
thanks
sitaram

Hi Change your code to the following.
/E ELE
/: IF &VAR& = '10'
welcome
/: ELSE
bye
/:ENDIF

Similar Messages

  • "Run Scripts" giving a problem to create portal domain

    Hello All.
    I am new to weblogic portal development. Was trying to create my basic sample portal in weblogic_portal_10.3.4 with the help of documentation. I am getting in running scripts when I was creating the domain. I have followed the below steps, please help me if you find any issue with my steps.
    1. downloaded Weblogic_Portal_10.3.4 and installed in my windows 7 environment.
    2. launched eclipse for weblogic portal.
    3. opened portal prospective in eclipse.
    4. right click on server tab and selected "Oracle WebLogic Server 11gR1 (10.3.4)"
    5. opened "Domain Configuration Wizard"
    6. Selected "Create a new Weblogic domain" radio button.
    7. in the next screen for "Generate a domain configured automatically to support the following products"
    selected "Weblogic Portal 10.3.4" radio button
    8. in the next screen given the domain_name
    9. in the next screen provided the password/confirm-password for administrator user
    10. in the next screen selected JRocket SDK and development_mode for my domain.
    11. in the next screen just left all the default configuration for the datasources. ( non of the datasource is selected in their check boxes)
    12. in the next screen just clicked on "Next" button and "OK" on my popup
    13. in this screen "p13nDataSource" is selected on my left top window area, All 3 SQL Files are selected for loading database.
    Clicked on *"Run Scripts"*
    At this point i am getting an error saying : "CFGFWK-60839:  Database Load Failed!"
    java.lang.Exception: SQLException when executing file file:/C:/Oracle/Middleware/wlportal_10.3/p13n/db/derby/seq_drop_tables.sql
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:183)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1673)
    Caused by: java.sql.SQLNonTransientConnectionException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:272)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         ... 1 more
    Caused by: org.apache.derby.client.am.DisconnectException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
         at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:273)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1674)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:529)
         at java.net.Socket.connect(Socket.java:478)
         at java.net.Socket.<init>(Socket.java:375)
         at java.net.Socket.<init>(Socket.java:189)
         at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:206)
         at org.apache.derby.client.net.OpenSocketAction.run(Unknown Source)
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
         at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:272)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1673)
    CFGFWK-60839:  Database Load Failed!
    Please help me if you find any problem with the steps that I am following to create my weblogic_portal_domain.
    I was following the steps mentioned at : http://docs.oracle.com/cd/E15919_01/wlp.1032/e14252.pdf to create my domain to start portal development.

    Those are the WLP 10.3.2 instructions. But, the 10.3.4 instructions in the tutorial (http://docs.oracle.com/cd/E26806_01/wlp.1034/e14252/setup_dev_env.htm#i1014619) are wrong, too.
    In 10.3.4, with derby, Run Scripts doesn't work any longer; it should still work the other database (Oracle, SQL Server, etc.). Instead, for derby, just create the domain, accepting any warning dialogs about databases that come up. After that finishes, in the domain directory, run create_db.cmd (on windows) or create_db.sh (on *nix and Mac). It should create the derby database files in the domain, and include everything needed.
    I'll send a note to get the docs updated.
    Greg

  • The Script root.sh problem - ora.asm and ASM and Clusterware Stack failed

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 VMs (rac1 and rac2) whose OS are Oracle Linux 5.6 in VMPlayer according to the website http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    I am installing Grid infrastructure. On step 9 of 10 - execute script /u01/app/grid/root.sh for 2 VMs rac1 and rac2.
    After run root.sh in rac1 successfully. I run root.sh in rac2 and get an error as below:
    [root@rac2 grid]# ./root.sh
    Running Oracle 11g root.sh script...
    The following environment variables are set as:
    ORACLE_OWNER= ora11g
    ORACLE_HOME= /u01/app/grid
    Enter the full pathname of the local bin directory: [usr/local/bin]: /usr/local/bin
    Copying dbhome to /usr/local/bin ...
    Copying oraenv to /usr/local/bin ...
    Copying coraenv to /usr/local/bin ...
    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root.sh script.
    Now product-specific root actions will be performed.
    2012-03-05 16:32:52: Parsing the host name
    2012-03-05 16:32:52: Checking for super user privileges
    2012-03-05 16:32:52: User has super user privileges
    Using configuration parameter file: /u01/app/grid/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    Adding daemon to inittab
    CRS-4123: Oracle High Availability Services has been started.
    ohasd is starting
    CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac1, number 1, and is terminating
    An active cluster was found during exclusive startup, restarting to join the cluster
    CRS-2672: Attempting to start 'ora.mdnsd' on 'rac2'
    CRS-2676: Start of 'ora.mdnsd' on 'rac2' succeeded
    CRS-2672: Attempting to start 'ora.gipcd' on 'rac2'
    CRS-2676: Start of 'ora.gipcd' on 'rac2' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'rac2'
    CRS-2676: Start of 'ora.gpnpd' on 'rac2' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac2'
    CRS-2676: Start of 'ora.cssdmonitor' on 'rac2' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'rac2'
    CRS-2672: Attempting to start 'ora.diskmon' on 'rac2'
    CRS-2676: Start of 'ora.diskmon' on 'rac2' succeeded
    CRS-2676: Start of 'ora.cssd' on 'rac2' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'rac2'
    Start action for octssd aborted
    CRS-2676: Start of 'ora.ctssd' on 'rac2' succeeded
    CRS-2672: Attempting to start 'ora.drivers.acfs' on 'rac2'
    CRS-2672: Attempting to start 'ora.asm' on 'rac2'
    CRS-2676: Start of 'ora.drivers.acfs' on 'rac2' succeeded
    CRS-2676: Start of 'ora.asm' on 'rac2' succeeded
    CRS-2664: Resource 'ora.ctssd' is already running on 'rac2'
    CRS-4000: Command Start failed, or completed with errors.
    Command return code of 1 (256) from command: /u01/app/grid/bin/crsctl start resource ora.asm -init
    Start of resource "ora.asm -init" failed
    Failed to start ASM
    Failed to start Oracle Clusterware stack
    [root@rac2 grid]#
    As we see the output above, at the end of the output
    1) Start of resource ora.asm -init failed
    2) Failed to start ASM
    3) Failed to start Oracle Clusterware stack
    The runInstaller is in the first VM rac1. My question is:
    Do any folk understand how to solve the script root.sh in rac2 problem ( 3 fails of ora.asm, ASM and Clusterware stack as above) ?
    Thanks.

    Please check there is no firewall exist:
    try this like:
    root.sh fails on second node
    MOS note:
    11gR2 Grid: root.sh Fails to Start the Clusterware on the Second Node Due to Firewall on Private Network [ID 981357.1]
    Grid Infrastructure 11.2.0.2 Installation or Upgrade may fail due to Multicasting Requirement [ID 1212703.1] (Most probabily this issue)

  • FM SD_SALESDOCUMENT_CREATE - pricing condition problem

    Hello,
    I hope someone could help me on this one:
    First of all, my SAP version is 4.6c. 
    I've been developing a program that will create a sales contract using FM  SD_SALESDOCUMENT_CREATE.  Overall, the sales contract is being created successfully.
    However, in the item pricing, the pricing condition that I need to create is being duplicated.  I understand that in the pricing procedure the particular condition is being inserted automatically.  The problem is, instead of the FM updating the default inserted pricing condition, it's inserting the one being passed.
    I've already done a little research through the forums.  I've tried [this|SD_SALESDOCUMENT_CREATE with Pricing Condition; suggestion where I create first the document then update it using SD_SALESDOCUMENT_CHANGE.  There is also  [this suggestion|SD_SALESDOCUMENT_CREATE - Duplicate sales conditions; that sets the field LOGIC_SWITCH-COND_HANDL, but my version does not have that field. 
    Finally, there's [this suggestion|http://www.sapfans.com/forums/viewtopic.php?f=13&t=218865&start=0&st=0&sk=t&sd=a] that sets the field LOGIC_SWITCH-PRICING to a particular value.  I tried the initially suggested value of 'G' - Copy pricing elements unchanged and redetermine taxes.  The duplicate condition no longer occurs, but other pricing conditions were removed.  Using other values resulted in either the contract creation failing, or the condition value not updating.
    So, please please can anyone help with my problem?  Thank you in advance.

    SALES_CONDITIONS_IN
                ITM_NUMBER                     000010
                COND_ST_NO                     020
                COND_COUNT                     01
                COND_TYPE                      YB05
                COND_VALUE                                           10.000000000
                CURRENCY                       TWD
    SALES_CONDITIONS_INX
               ITM_NUMBER                     000010
               COND_ST_NO                     020
               COND_COUNT                     01
               COND_TYPE                      YB05
               UPDATEFLAG                     U
               COND_VALUE                     X
               CURRENCY                       X
    IF the condition is being inserted automatically,you must update it.
    some import parameters are obligatory,including COND_ST_NO COND_COUNT.

  • Terms & Conditions problem in App Store

    I want to install a free app on my Iphone. But every time that I try, app store show me a message of "Terms & Conditions have changed.." that I should agree. I have agreed around 15 times and I still can't download the app. Can anybody help me?

    I'm using the Guatemala itunes store with a Guatemalan credit card, and i have downloaded about 40 aplications since april 09' and never with a problem, until this monday, that every time i try it shows me that "Terms & Conditions have change"
    Yo estoy en las mismas, y es que ni en la compu me deja bajar ninguna sola aplicacion, ni menos en el iphone.
    Lo raro es que probe bajar una aplicacion gratis en mi ipod touch y si me dejo, y otro cuate con otra cuenta probamos y en la cuenta de él si puede descargar todas las aplicaciones. hay me cuentan si saben algo...

  • Dreamweaver CS3 Scripting Youtube embedding Problems

    I use embeds from youtube on my site. They are usually no
    problem. Today I
    upgraded from Dreamweaver 8 to CS3. When saving my files and
    uploading to the host, CS3
    created two scripts that it said were necessary for
    standards-based sites and
    applications:
    AC_Activex.js
    AC_Runactivecontent.js
    CS3 indicated that they must be uploaded in "Scripts" folder
    to host. Now all my
    embeds show up as a red x in IE7. Oddly enough they work in
    Monzilla. Sounds like a version problem doesn't it? Although of
    course my host (Bluehost) says it ain't their problem.

    Check out the following extension:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1327520
    From the looks of your code you were embedding Youtube links
    as if they were Flash. However, while they are Flash, Youtube has
    its own system for embedding. I believe Youtube does provide you
    with code to do this. However, this plugin should do it all for you
    from within Dreamweaver.

  • InDesign server CS 5.5 - app.scriptArgs.get doesn't work in jsx script or simpleclient problem

    Hello
    I'm working with Adobe InDesing Server CS 5.5 and having problem that *.jsx script is not able to read input parameters passwd from sampleclient.exe or SOAP (same story in both cases)
    I run following command:
         sampleclient.exe -host localhost:8080 "c:\CreateJPEG.jsx" param1="1"
    also
         sampleclient.exe -host localhost:8080 "c:\CreateJPEG.jsx" param1=1
    and even
         sampleclient.exe -host localhost:8080 "c:\CreateJPEG.jsx" "param1=1"
    app.scriptArgs.get("param1") is always FALSE (see script body below).
    Please help, I couldn't find an answer anywhere. All documents stats that this should work in a way I described, but it doesn't. Script is performed but param1 is not set.
    Here is the script:
    #target  InDesignServer
    app.scriptPreferences.version = 7.0;
    main();
    function main()
      var eRet;   
      if (app.scriptArgs.get("param1"))
        var sXMLFilePath = "C:\\CreateJPEG.xml";
        var eRet = app.createJpeg (sXMLFilePath);

    I am having the same issue. I am pssing thru SOAP call through
         sampleclient.java -host localhost:12345 "c:\myJSXScript.jsx" myXml="myXmlLocation"
    JSX:
    function main() {
        try {
            var myInDesignXml;
            app.consoleout("isDefined:=" +app.scriptArgs.isDefined("myXml"));
            if (app.scriptArgs.isDefined("myXml")) {
              myInDesignXml = app.scriptArgs.getValue("myXml")
            app.consoleout("myXml:=" + myXml);
        } catch (e) {
            app.consoleout('General Exception');
        return result;
    main();
    Output:
    isDefined:=false
    I should get the text that we have assigned to myXml param.
    Please Help on this.
    Regards,
    JK

  • Oracle 11gR2 RAC: Running the script root.sh problem

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
    http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    I have been installing Grid Infrastructure using runInstaller from step 1 to step 9 of 10 in both VM rac1 and rac2.
    Now, I am running the script root.sh in VM rac1 and rac2 as below:
    [root@rac1 /]# /u01/app/grid/root.sh
    Output:
    CRS-4123: ohasd is starting
    FATAL: Module oracleoks not found
    FATAL: Module oracleadvm not found
    FATAL: Module oracleacfs not found
    ACFS-9121: Failed to detect /dev/asm/.asm_ctl_spec
    ACFS-9310: ADVM/ACFS installation failed.
    ACFS-9311: not all components were detected after installation
    'UpdateNodeList' was successful.
    [root@rac1 /]#
    [root@rac2 /]# /u01/app/grid/root.sh
    Output:
    CRS-4123: ohasd is starting
    FATAL: Module oracleoks not found
    FATAL: Module oracleadvm not found
    FATAL: Module oracleacfs not found
    ACFS-9121: Failed to detect /dev/asm/.asm_ctl_spec
    ACFS-9310: ADVM/ACFS installation failed.
    ACFS-9311: not all components were detected after installation
    Start of resource "ora.asm_init" failed.
    Failed to start ASM.
    Failed to start Oracle Clusterware Stack.
    [root@rac2 /]#
    As we see the output above, rac1 and rac2 get the same problems. in addition, rac2 fails to start ASM and Clusterware stack. Thus, I have 2 questions:
    First, the common problem for rac1 and rac2 :
    1)Module "oracleoks, oracleadvm, oracleacfs" not found
    2)/dev/asm/.asm_ctl_spec not detected
    3)ADVM/ACFS installation failed
    Do the above 3 factors affect Grid and DataBase Installation later ? If yes, how to solve these problems ?
    Second, how to start ASM and Clusterware stack in rac2 ?
    Thanks.

    you have 2 options:
    1. OEL 5.6 comes with 2 kernels, the original Red Hat, and Oracle UEK, you can choose not to use UEK
    or the one i would recommend:
    2. Upgrade Grid Infrastructure,
    *11.2.0.3.1* (patch 13348650, released about a 1 month ago) supports ACFS on UEK (starting with 2.6.32.200 IIRC)

  • SSIS Script Component Conditional Split to Flat File Destination

    I have a flat file which needs to be split into multiple flat files based on value in RecordType column. 
    For example, if (RecordType == 20), then direct all rows to a new text file, 
    I have around 15 different record types. I have managed to write some C# code for Conditional Split, but 
    still trying to figure out what is the next step to save these rows to a text file. 
    I will be grateful if someone please point me to the right direction.
    Many Thanks
    #region Namespaces
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    using System.IO;
    #endregion
    [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
    public class ScriptMain : UserComponent
    string copiedAddressFile;
    private StreamWriter textWriter;
    private string columnDelimiter = ",";
    private string filepath = @"C:\DestFiles";
    private string[] columns;
    public override void PreExecute()
    IDTSInput100 input = ComponentMetaData.InputCollection[0];
    columns = new string[input.InputColumnCollection.Count];
    for (int i = 0; i < input.InputColumnCollection.Count; i++)
    columns[i] = input.InputColumnCollection[i].Name;
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (Row.intRecordType ==20)
    Row.DirectRowToRecordType20();
    else if (Row.intRecordType ==10)
    Row.DirectRowToRecordType10();

    see similar example
    http://www.sqlis.com/sqlis/post/Using-the-Script-Component-as-a-Conditional-Split.aspx
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Gross Price Condition problem in Import PO

    Dear Freinds,
    I have a problem in my Import Po .
    I have contract for this Po , but when i make a Po both my Gross Price condt P000 & P001 are populated & with price in both the condition .
    The users have made the Po without checking that the price of both the condt P000& P001 have appeared in the PO & total Po price is faulty , now if I try  to amend this Po that is if I try to remove the condition P001 from the Po its giving me an error .
    Kindly help me how do I resolve this issue
    Thanks in advance

    Dear Jayakanthan,
    I have made this as zero but its not allowing me to do zero .
    Secondly when I make a new PO in condition its showing price against condt P000 & P001.
    Kindly guide how do I resolve this issue.

  • Using backup script from console (problem)

    When I try to use the backupdatabase.sh script from shell as root (memeber of dba group)
    I get flash recovery area net enabled error.
    If I run it with my current user (also member of dba) it is successfull.
    I've enabled log archiving.
    Where could be the problem?
    I even have user root as db user and dba

    Pretty simple, really: it's all about security. You know ... the stuff that is causing Microsoft regular (but not necessarily good) press these days.
    Until the early-1990s, Oracle worked well in Unix using the root userid. The shared memory mechanism allows all users running Oracle to see the memory contents of the userid running the processes - and the Oracle kernel runs as an setuid/setgid application.
    Running something as accessible as Oracle with the ability to read any memory is a recipie for security concerns. Around Oracle 7.1.32, they started making it tougher to run the kernel under root. IIRC, since Oracle 8.0, the Oracle kernel checks that it is not being started as root.

  • HT201272 wait just to be sure i am not the only one who has the "term and conditions" problem

    wait just to be sure i am not the only one who has the "term and conditions" problem

    Go to Crucial.com and use one of their two methods to determine what upgrades are available for your Mac:
    I would purchase the modules from Crucial as they are very reliable and wiill work with you if you have problems.
    OT

  • If Condition problem in obtaining layout

    Hi,
    I have problem in a condition while obtaining cross -tab report layout.
    The counts are not falling correctly even i have given the conditions
    Department Location1 Location2
    Employee Co-Op Intern     Contractor Employe Co-Op Inter Contractor
    ------------------------------------------------------------------------------------------------------------------------------------------------- |
    910 Admin 6 0 2 0 0 2 0 0
    ------------------------------------------------------------------------------------------------------------------------------------------------- |
    Here, in the above mock up layout, my (location1 and location2) and (Employee, Co-op, Intern, Contractor)are populating dynamically and using
    <?for-each-group@column:G_1;WORK_LOCATION?>
    Next, i am using if condition to get the counts for department 910 Admin as follows:
    <?for-each-group@cell://G_1;WORK_LOCATION?>
    For Employee:*<?if:(EMPLOYEE_TYPE = 'Employee')?>*<?if:count(current-group()[NAME=$NAM])?> <?current-group()[NAME=$NAM]/COUNT_PERSON?><?end if?><?end if?>
    For Co-op:<?if:(EMPLOYEE_TYPE = 'Co-op')?><?if:count(current-group()[NAME=$NAM])?> <?current-group()[NAME=$NAM]/COUNT_PERSON?><?end if?>
    <?end if?>
    For Intern:<?if:(EMPLOYEE_TYPE = 'Intern')?><?if:count(current-group()[NAME=$NAM])?> <?current-group()[NAME=$NAM]/COUNT_PERSON?><?end if?>
    <?end if?>
    For Contractor:<?if:(EMPLOYEE_TYPE = 'Contractor')?><?if:count(current-group()[NAME=$NAM])?> <?current-group()[$x='Contractor']/COUNT_PERSON?><?end if?><?end if?>
    This if condition is not working properly.
    The problem is the counts are not exactly falling under the correct (Employee, Co-op, Intern, Contractor) even i have provided if conditionCan someone let me know if i am making any mistake here.
    My XML is as follows say for example:
    - <G_1>
    <EMPLOYEE_TYPE>Employee</EMPLOYEE_TYPE>
    <TOP_ORG>910 Admin</TOP_ORG>
    <WORK_LOCATION>Location1 WORK_LOCATION>
    <LVL>1</LVL>
    <REC>2</REC>
    <NAME>910 Admin</NAME>
    <COUNT_PERSON>6</COUNT_PERSON>
    </G_1>
    - <G_1>
    <EMPLOYEE_TYPE>Intern</EMPLOYEE_TYPE>
    <TOP_ORG>910 Admin</TOP_ORG>
    <WORK_LOCATION>Location1</WORK_LOCATION>
    <LVL>2</LVL>
    <REC>3</REC>
    <NAME>910 Admin</NAME>
    <COUNT_PERSON>2</COUNT_PERSON>
    </G_1>
    - <G_1>
    <EMPLOYEE_TYPE>Co-Op</EMPLOYEE_TYPE>
    <TOP_ORG>910 Admin</TOP_ORG>
    <WORK_LOCATION>Location2 WORK_LOCATION>
    <LVL>1</LVL>
    <REC>2</REC>
    <NAME>910 Admin</NAME>
    <COUNT_PERSON>6</COUNT_PERSON>
    </G_1>
    Thanks,
    Ratan

    The grouping goes as follows for the layout listed earlier [Groupging Ending at end of row]:
    Department *(FOREACH1)* Location**(ENDFOE)**
    *(FOREACH2)* Employee Co-Op Intern Contractor *(ENDFOE)*
    910 Admin *(FOREACH3)* CNT1 CNT2 CNT3 CNT4 *(ENDFOE)*
    FOREACH1 --> <?for-each-group@column:G_1;WORK_LOCATION?>
    FOREACH2 --> <?for-each-group@column:G_1;WORK_LOCATION?>
    FOREACH3 --> <?for-each-group@cell://G_1;WORK_LOCATION?>
    CNT1
    <?if:(EMPLOYEE_TYPE = 'Employee')?><?if:count(current-group()[NAME=$NAM])?> <?current-group()[NAME=$NAM]/COUNT_PERSON?><?end if?><?endif?>
    CNT2
    <?if:(EMPLOYEE_TYPE = 'Co-op')?><?if:count(current-group()[NAME=$NAM])?> <?current-group()[NAME=$NAM]/COUNT_PERSON?><?end if?><?end if?>
    CNT3
    <?if:(EMPLOYEE_TYPE = 'Intern')?><?if:count(current-group()[NAME=$NAM])?><?current-group()[NAME=$NAM]/COUNT_PERSON?><?end if?><?end if?>
    CNT4
    <?if:(EMPLOYEE_TYPE = 'Contractor')?><?if:count(current-group()[NAME=$NAM])?> <?current-group()[NAME=$NAM]/COUNT_PERSON?><?end if?><?end if?>
    Thanks,
    Ratan

  • Query Manager Condition Problem

    Dear expert,
    In B1 query manager, i found a report called 'Production Order Report' and there is a searching condition which i don't understand.
    Code:
    T3.CardName= '[%9]' or '[%9]' = ''
    If user dose not input this parameter, how the query manager  handle the query??

    Hi Kit,
    The query code you mentioned basically says that if the [%9] variable is blank, don't filter on it, else filter on it. You can test it with this query
    declare @Code varchar(15)
    set @Code= ''
    --set @Code = 'C1000'
    select * from ocrd where (Cardcode= @Code or @Code = '')
    If you run it as is, all records in OCRD will be returned, if you run it with the commented line uncommented it will return only C1000.
    Hope it helps,
    Adele
    <i>PS: I have seen that every post you make you set as answered/solved problem already. Please make sure which problems are solved and which not. People tend to not look at solved posts that often. Every question you asked have been marked as solved before anyone replied. Were they solved?</i>

  • Bash script - sqllite insert problem

    So, I'm making a bash script that inserts a config file into a database, but I can't get it to work.
    This is my best attempt so far:
    name="bashrc"
    location="/home/user/.bashrc"
    content=`cat "$location"`
    sqlite3 testdb "insert into dbase values ('`echo $name`','`echo "$location"`','`echo "$content"`')"
    the table is
    create table dbase(name text, location text, data text)
    I had a hard time trying to figure out how I'd be able to get $variables to work (because of the quotes) and this echo style seems to work, but there seems to be no way to insert the config file into the database.
    plaintext files seem to work no problem, but when I'm trying to insert some config file, it spits out errors. (It seems like it's trying to execute the file somehow?)
    Last edited by initbox (2009-08-29 15:28:49)

    initbox wrote:I was thinking the single quotes were stopping bash from replacing $variables with the content, hence the echoes.
    your single quotes are inside a double quote, so to bash they're just another character in the string.
    I'm still getting an SQL syntax error, so bash is no longer getting in the way, but this thing is a true nightmare. What next? This turned out to be way harder than I expected, I'm just doing this as a "fun" learning experiment.
    Your error is probably because I was escaping the quotes for bash, and I should have been escaping them for sqlite. In sqlite, escaping a quote is done by doubling it, so ' is escaped to '' (that's two apostrephes side by side, not a double quote. Compare '' and ").
    This untested sed command might work:
    content = $(cat $location | sed "s/\'/\'\'/g")
    The \'s are escaping the quote from bash, what its really doing is replacing ' with ''.
    Dusty

Maybe you are looking for