Cfformitem script variable used in cfif

Hi,
I have this code within a cfform in flash format:
<cfformitem type="script">
mycat = {Category.selectedItem.data};
</cfformitem>
<cfformitem type="html">
<cfif #mycat# IS 'XXX'>....</cfif>
</cfformitem>
It tells me #mycat# is undefined
Can someone tell me how i can correctly set the mycat
variable so that i can use it with my cfif?
it would be very nice of you because i'm lost here ;-(
regards,
kat

It's available in actionscript.
So, let's assume you want to change the text in a form field
called "myText"
Then
if(mycatt == 'XXX'){
_root.myText.text = 'Some new text.';
Ken

Similar Messages

  • Passing Script variable to Package variable, ultimately used as fileName

    Following an excellent post by Geplaatst door Joost, I put together a script which SHOULD populate a package variable, then use that variable as a file name.
    The Script code is as follows:
    public class ScriptMain : UserComponent
    string iScriptVar;
    public override void PreExecute()
    base.PreExecute();
    public override void PostExecute()
    base.PostExecute();
    Variables.ExtractName = iScriptVar.ToString();
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (!Row.CUSIP_IsNull)
    iScriptVar = Row.CUSIP.ToString();
    A Windows message box (put in as debug, but removed for brevity here) shows the correct value is being set to iScriptVar at all points it was inserted.
    The "ExtractName" variable is checked as a ReadWriteVariables for the Script properties.
    But, the "ExtractName" package variable is not being passed to the Expressions for the FlatFile Connection properties, which is set to:  @[User::ExtractName].
    Where have I gone wrong?

    Why not to provide the link to the post already?
    iScriptVar
    is a local to script variable this explains why it did not you need the full wiring
    e.g.
    Dts.Variables["User::iScriptVar"].Value = iScriptVar
    Arthur
    MyBlog
    Twitter

  • Need help with setting a variable using actionscript

    So I am trying to import in XML and this is working fine, But
    once in flash I need to reference this variable in a later script.
    Here is what I got.
    function loadXML(loaded) {
    if (loaded) {
    /////this is the variable, which is working, it pulls the
    info from the xml document properly.
    var node1 =
    this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
    ////another variable, etc...
    var node2 =
    this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
    /////when traced it outputs the proper value.
    trace(node1);
    ////////does not work here though.
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("co.xml");
    var latmin = 37;
    var latmax = 41;
    var lonmin = -109;
    var lonmax = -102;
    this.geoPlotter_gp.setRange(latmin, latmax, lonmin, lonmax);
    this.geoPlotter_gp.setNodeSymbol("geoPloterNodeSymbol");
    this.geoPlotter_gp.addNode(40.48, -107);
    ////////////////This is where I need to now use the variables
    defined above//////////////
    this.geoPlotter_gp.addNode(node1);// Boulder
    this.geoPlotter_gp.addNode(node2);// Denver
    /////any ideas all? I am sure this is something simple...I am
    just overlooking something.

    when you prefix a variable using var within a function,
    you're making it local to that function. ie, node1 and node2 are
    undefined outside loadXML().
    to remedy, don't prefix with var.

  • How to pass a result of SQL query to shell script variable

    Hi all,
    I am trying to pass the result of a simple SQL query that only returns a single row into the shell script variable ( This particular SQL is being executed from inside the same shell script).
    I want to use this value of the variable again in the same shell scirpt by opening another SQL plus session.
    I just want to have some values before hand so that I dont have to do multiple joins in the actual SQL to process data.

    Here an example :
    SQL> select empno,ename,deptno from emp;
         EMPNO ENAME          DEPTNO
          7369 SMITH              20
          7499 ALLEN              30
          7521 WARD               30
          7566 JONES              20
          7654 MARTIN             30
          7698 BLAKE              30
          7782 CLARK              10
          7788 SCOTT              20
          7839 KING               10
          7844 TURNER             30
          7876 ADAMS              20
          7900 JAMES              30
          7902 FORD               20
          7934 MILLER             10
    14 rows selected.
    SQL> select * from dept;
        DEPTNO DNAME          LOC
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    $ cat my_shell.sh
    ### First query #####
    ENAME_DEPTNO=`sqlplus -s scott/tiger << EOF
    set pages 0
    select ename,deptno from emp where empno=$1;
    exit
    EOF`
    ENAME=`echo $ENAME_DEPTNO | awk '{print $1}'`
    DEPTNO=`echo $ENAME_DEPTNO | awk '{print $2}'`
    echo "Ename         = "$ENAME
    echo "Dept          = "$DEPTNO
    ### Second query #####
    DNAME_LOC=`sqlplus -s scott/tiger << EOF
    set pages 0
    select dname,loc from dept where deptno=$DEPTNO;
    exit
    EOF`
    DNAME=`echo $DNAME_LOC | awk '{print $1}'`
    LOC=`echo $DNAME_LOC | awk '{print $2}'`
    echo "Dept Name     = "$DNAME
    echo "Dept Location = "$LOC
    $ ./my_shell.sh 7902
    Ename         = FORD
    Dept          = 20
    Dept Name     = RESEARCH
    Dept Location = DALLAS
    $                                                                           

  • Returning/passing Java script variable/value to PL/SQL environment

    Hi,
    Can someone give me a sample code about how to return a Java script variable to PLSQL environment?
    for example, I have a javascript function that returns timestamp in milisecond, I then want to write PLSQL code to call this java script function and save its value in a number-typed plsql variable for further calculation, I dont know how the two scripting language communicate.
    Thank you very much
    Binh
    null

    This is quite simple.
    I assume that you are able to define html form side through pl/sql. Suppose your new pl/sql value is v_time then in the procedure that you write include one more statement
    htp.p('<Input type=hidden name="v_time" value="">');
    and also in the form invocation,
    htp.p('<form name=app method=post action="time_handler" onSubmit="return false;">');
    and to the end you must be having a submit
    to it attach a onClick function that calls
    simply our validate function..
    eg htp.p('<Input type=submit value="process"
    onClick="validate();">');
    Include in the head portion
    the following script using htp.p procedure
    function validate()
    app.v_time.value=<calculated value>;
    return app.submit();
    Hope this helps.
    Nat
    null

  • How to set ENV variable using user profile in solaris 10 while using ssh

    Hi,
    Please help me in setting the environment variable using user profile file while using ssh method of connection (Can I use the same ~/.profile file?)
    when i am logging in using the telnet, the environment variable is automattically set, but not when I am using SSH.
    Thanks in advance
    ushas symon

    Please list your .profile and a ls -la of your home directory.
    also list the result of env after your logged through telnet and ssh.
    There should be no difference - it depends mostly on your login shell which startup script it executes. ksh uses .profile, bash: bash_profile then .profile.

  • JSP1.2 scripting variable! help!!

    JSP1.2 scripting variable! help!!
    Posted by: Tony Liu on August 18, 2005 @ 03:06 PM
    TOMCAT5/jsp1.2. I am using custom tag to expose a variable�Cthen a jsp script references an object that tag exposes. However, error happens to me always. "variable cannot be resolved". looks it cant expose the variable to jsp page.
    My code:
    TLD file:
    <variable>
    <name-from-attribute>method</name-from-attribute>
    <variable-class>java.lang.String</variable-class>
    <declare>true</declare>
    <scope>AT_BEGIN</scope>
    </variable>
    someTag.java
    pageContext.setAttribute("method",string1);
    somePage.jsp
    <%=method%>
    error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 90 in the jsp file: /Tony/amvetsform.jsp
    Generated servlet error:
    method cannot be resolved
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Who could let me know what's wrong with it? Bug from Tomcat? Or, I missed something to produce a scripting variable for jsp? It was supposed to be easy to expose a variable....
    Thanks in advance.
    Tony

    A bit more info please.
    How are you using this with your tag?
    The code from your JSP with
    - your custom tag being used
    - where it is in relation to your scriptlet expression.
    The "name-from-attribute" means that the name of the created variable is defined by the "method" attribute of your tag.
    <my:tag method="theNameOfMyVariable">
      <%= theNameOfMyVariable %>
    </my:tag>Where do you use the variable in relation to where the tag is?
    Declaring it AT_BEGIN means that it is available from the start tag to the close of any enclosing custom tag.
    It won't be a bug in Tomcat. Always assume it is a problem with your code. 99.99% of the time, that assumption is correct.
    Cheers,
    evnafets

  • Passing importing parameter in  ABAP to  java script variable

    Hi Experts,
    I am calling a ABAP function module in javascript.Now how can I take importing parameter in  ABAP to java script variable. Because I need to give alert using the improting Paramter value...
    Thanks in advance..
    RR

    to pass ABAP variable value to javascript variable the syntax is
    var myjsvariable = "<%=abapvariable%>";
    Edited by: Durairaj Athavan Raja on Jul 29, 2009 2:39 PM

  • Scripting variables and custom tags

    Hello,
    I wonder how I could use a scripting variable in a custom tag? I have written a tag that formats number and dates, and would like to be able to do somethin like
    <% double x = 12,345; %>
    <x:write name="x" format="xyz" />
    Also I wonder how best to implement tags with parameters? I don't suppose it's possible to nest tags or scriplets in a way like <x:bla name="test" value="<%= 12345 %>" />? It seems tedious having to create an Object just to pass a Parameter.
    Many thanks in advance for any help!
    Bjoern

    I think I found the solution,
    pageContext.setAttribute(...,...)

  • Cannot initialize default script variable

    Hello,
    I am using Unified CCx Editor version 7.0(1.168). I created a script to be used instead of the system default script. According to the help file, "All script variables from the main script can initialize the default script variables, if the designer defines them using the same name and type". However, the variables in my default script are never initialized even though the same variables in the main script are changed before the main script terminates. I made sure they have the same name and type, but the values in the default script remain unchanged.
    All the variables I am trying to pass are of type String, and initially they are all set to the empty string "" in both scripts.
    Does anyone know what's wrong?
    Thank you.

    Hi
    I'm not sure I understand what you are asking, but will try telling you this to see if it makes things clearer:
    Basically the variables in each script (i.e. each .aef file) are unique to the .aef, there is no way to change a variable in one and have it directly affect the state of a variable in another. Even if you are looking at two executions of the same .aef script, the variables are unique/distinct instances; there is no concept of 'static' variables.
    Regards
    Aaron

  • Accessing database Variables using JDBC

    Hi,
    I have a question for some of you Java specialists out there.
    I want to execute a select statment in my database (SQL Server 2000) and store the output in a variable. - The reason I am not directly executing the SQL statement from my JDBC connection is that I need to execute a number of SQL statements and then finally would like to store my result set in a variable in the database - NOW, my question is , how do I (If I can) access a database variable using either servlets or JSP. Any help is welcome.
    A quick response would be much appreciated.
    thanks

    We are probably talking about different things.
    ASP, at least when I used consisted of the following:
    -html
    -server side script (vbscript, javascript, perlscript)
    -client side script (usually javascript but it could be vbscript and perlscript)
    In the above you have three possible kinds of variables java, perl, vb. In each of those languages you can use SQL text to manipalate data in the database. However the text itself never ran in the ASP server nor was there such a thing a SQLscript, so there was nothing that was a SQL variable.
    However, if I write a stored procedure in Oracle, it can definitely have variables. And likewise a oracle package can have variables. But there is no way to directly use those variables in ASP. The value of the variable would have to be returned to the ASP script language and a variable in tha language could contain that value.
    Perhaps I just don't understand ASP or it has evolved in the last 3 years. If so then ignore everthing I have said.

  • IntelliJ IDEA - missing scripting variables

    I have set up a CQ5 project in IntelliJ, but there's one thing that's still missing. I'm using the CQ taglib and cq:defineObjects:
    <%@taglib prefix="cq" uri="http://www.day.com/taglibs/cq/1.0" %>
    <cq:defineObjects />
    All the needed JARs are included and all imports, taglibs etc. look good.
    However, when I try to use the defined scripting variables (slingRequest, currentPage, resource etc.) IntelliJ is unable to resolve them.
    Any ideas on what to do?

    I have exactly the same problem with weblogic 6.0 This seems to be a pretty obvious bug, could someone from weblogic comment on this?
              I've compiled jsp files with the scripting variable scoped NESTED and it is never declared anywhere in the compiled jsp file. If I changed the scoping to either AP_BEGIN or
              AT_END it is declared appropriately.
              Wendell Nichols
              Amdahl Software Ltd.
              Jan Pernica wrote:
              > Hello everybody
              >
              > We have implemented a set of tags declaring the NESTED scripting variables. When generating the java file the WL does not generate the declaration directives for variables.
              >
              > It works fine on TOMCAT but id does not work on WL 5.1.
              >
              > We had to change the scope of varibles from NESTED to AT_BEGIN and it works now.
              >
              > Any idea
              >
              > Thank you
              >
              > Jan
              

  • Scripting variable

    Is there a any chance to make scripting variable act lika a managed bean? If I define my bean as scripting variable, not managed bean and when page is loaded, bean isn't initialized.
    <h:inputText styleClass="inputText" id="postnumber" value="#{bean.postnumber}"/>
    Is there a way to initilize bean in beackingBean and then use it like this at page?

    Any examples or references? I'm pretty new withj JSF. All I fing from google is about Spring integration.

  • OpenScript script variables - can store multiple values or an array?

    Hello,
    I'm helping with a proof-of-concept for driving the Primavera P6 web services using OpenScript, and I'm having a bit of trouble using the script variables. One of the web services can return anywhere from 0 to many objects, and I was trying to save those object IDs into a script variable. The built-in "substitute variable" seemed to work great, but the variable only contains the last result, not all of them. Here's the line that's saving the value:
    http.solve("objIdsToDelete", "<ObjectId>(.+?)</ObjectId>", "", true, Source.Html, 0, EncodeOptions.None);
    Even if there are, for example, 5 <ObjectId> in the response, the variable only has the last result... Any suggestions on how I can tweak this (different regular expression?) to either store an array or a comma-separated list of all the values?
    Thanks!
    -Troy Newton

    Hi Troy,
    Sorry about my last answer. It wasn't too specific. So if you want to collect the whole array instead of a specific value (referenced by the index) you would change e.g.
    http.solve("formsload.loginsubmit_1",
                                  "FORM_SUBMIT_BUTTON':'(.+?)'", "", false, Source.Html,
                                  1, EncodeOptions.None);
    which would give you the second value from the array (remember that arrays are indexed from 0) to
    http.solve("formsload.loginsubmit_1",
                                  "FORM_SUBMIT_BUTTON':'(.+?)'", "", false, Source.Html,
                                  null, EncodeOptions.None);
    Notice the null, this will return an array to the coolection. You can then reference these by:
              String myStrings[]=getVariables().getAll("formsload.loginsubmit_1");
                        info("Number of elements in array is :" + myStrings.length);
                        for (int i=0;i<myStrings.length;i++)
                             info("Element Number " + i + ":" + myStrings [ i ] );
    This will result in an output like:
    0 Passed Comments: Number of elements in array is 2
    0 Passed Comments: Element Number 0: Submit Button
    0 Passed Comments: Element Number 1: Cancel
    I hope this helps.....
    Regards
    Wayne.
    Edited by: byrne_wayne on Nov 26, 2010 1:40 PM
    Edited by: byrne_wayne on Nov 26, 2010 4:42 PM

  • Which .bash does "do shell script" commands use?

    The "do shell script" command uses the Bourne shell "sh". But I am curious to know which .bash it uses to define the shell environment variables.
    I ran into a problem installing a third-party unix program which required new environment variables to be defined in order to execute. Defining these variables and executing this program from the terminal worked fine.
    But executing it within a "do shell script" command in an Applescript - the program died silently because the environment variables it required were not defined in the shell Applescript uses. It appears to invoke a new shell which does not inherit the environment variables defined in your home user shell.
    (I found this out by 'do shell script "set"' which listed the environment variables Applescript knows about - the ones I defined for the third-party program were not listed).
    A "brute force" way of fixing this is to pass the environment variables directly:
    do shell script "export THIRDPARTY_ENVVAR=blah; /usr/sbin/thirdpartyprogam"
    This works but not exactly elegant, particularly when you need to pass a number of variables.
    So - any better ways to do this? Can I edit the .bash Applescript uses, and where is it?
    Thanks.

    Another option that might work for you... if you are saving/distributing your AppleScript as an "Application bundler" is to group all your shell env. variables and other commands into a separate shell script file. Then include the shell script inside your app bundle. Locate the shell script at runtime and run that with "do shell script".
    For example, create "myShellScript.sh"
    #!/bin/sh
    export THIRDPARTY_ENVVAR=blah
    # ... more variable declarations..
    /usr/sbin/thirdpartyprogam
    # ... more shell commands...
    Store the shell script file inside your AppleScript bundle's Contents -> Resources folder (remember to make the shell script executable). Then your AppleScript can find your shell script at runtime and execute it like this:
    set ssPath to quoted form of POSIX path of (path to resource "myShellScript.sh")
    set stdout to do shell script ssPath
    Steve

Maybe you are looking for

  • How to create a vehicle in VELO

    Hi; I am new to VMS and trying to figure it.  In our SAP DEV system, I have done the following: 1. Created a configuration profile 2. Created a material master record for a model car in MM01. 3. Tried to build an action matrix. 4. Defined Vehicle Sta

  • Connecting CRS-1 to CISCO7609-S

    Hello, We are in the design phase for upgrading the exisiting POS connectivity between the P & PE router. 1- A new module will be installed in the CRS-1 (2-10GE-WL-FLEX) 2- A new module will be installed in the cisco7609-S (7600-ES20-2X10G) 3- XFP-10

  • Can't Adjust Brightness in Windows 7

    I recentlly installed win 7 rc on my G530 and i cannot adjust the brightness anymore. i download the hotkey features driver which now allows me to adjust the volume and everything except screen brightness...is there a specific driver i have to downlo

  • Video 8, Import via Firewire or TBC to DV Deck

    I'm working through a project that involves quite a few Video 8 and Hi8 material. The Sony deck I have can output this video via Firewire, using a DV preset. My question is, will that workflow produce the best results? As opposed to outputting analog

  • Line-out or internal speaker option

    I have my iMac hooked up to my home stereo with a mini to RCA cable and i am trying to figure out a way to switch from home stereo to internal speakers without having to unplug the cable every time. Any help would be great. Thanks.