Variable inside the Variable

To reference a variable inside another variable, I know you can do something like:

< cfset variable internal = 1 >
< cfset outer_variable = "the internal variable is #inner_variable # ' >

.. .and the #outer_variable < cfoutput > exit # < / cfoutput > would be:

"The internal variable is 1.

But I can't get it work with the query results. If the string, "Hello" #name # is stored in the "welcome message" field in a table in my database:

.. #name # is stored in the variable scope on my CF page like 'joe' and when I

< cfloop query = 'test' >
< cfoutput > #greeting # < / cfoutput >
< / cfloop >

... I get "Hello" #name # instead of "Hello Joe".

Basically, there is a double standard. With regular variables, works of art, basic, but with some query variables it doesn't. Any ideas why or, more important, how to work around?

I need this is because I am storing the emails that we send to customers in a database. The body of the email contains variables holding individual information (name, password, etc.). To get the password inserted in the body of the email or name of each person, I need to use variables in the variables.

OK, found the solution. In addition to using the evaluate function, I had to close my email body variable (or the 'outside') quotes in the database record itself. so it would be stored in the DB as:

"Hello #name #

and I'd call it:

#evaluate (email_body) #.

At this point, I don't know why it is like that, but I'll take it...

Tags: ColdFusion

Similar Questions

  • Get the value of the variable inside the function from the event (EventListener)

    How to get the value of the variable inside the function from the event. Variable has been declared as a function of external events.

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, myClickReaction);
    
    function myClickReaction (e:MouseEvent):void{
    StringVar="other sample";
    }
    
    trace(StringVar); /* it gives me "sample" value and i would get "other sample" value */ 
    

    This strange because if it would be the trace of a normal function would give me good result.

    var StringVar="sample";
    
    
    function myClickReaction():void{
    StringVar="other sample";
    }
    
    myClickReaction();
    trace(StringVar); /* it gives me result as i wanted to have - "other sample" value */ 
    

    I also know method of passing of arguments depending on the event, but it doesn't for me as I would like to

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){ myClickReaction(e, StringVar) },false, 0, true);
    
    function myClickReaction (e:MouseEvent, StrVar:String):void{
    
    StrVar="other sample";
    }
    
    trace(StringVar); /* it also gives me "sample" value and i would get "other sample" value */ 
    

    How to do it correctly?

    I do not know the structure of your screen lists so I can't tell you how to access the variable, but you're on the right track. If it's a parent, then you can always use the .parent property to cross to the top the list display to try to access.

    for example 1 level:

    MovieClip (this.parent). StringVar = "another sample";

    Add more properties .parent to continue to move to the top of the list.

    for example:

    MovieClip (this.parent.parent). StringVar = "another sample";

    Just like always, use traces (MovieClip (this.parent). StringVar); until you get the value that you want to know that you're accessing them correctly.

  • inside the text variable page numbers?

    Using ID3.  Variables of text for the current titles work well by themselves.  Insert page numbers also works well by itself.  However, I expect that management of the page numbers would be via an additional variable inside the head of the race variable.  Apparently, this is not correct?   I was thinking that something like this would be the best, regarding the layout more tight on my page and a more consistent presentation throughout the final book:

    (Sharp hooks attach together variable.)

    < [page number variable] EM [title of Book] space > for back

    < [chapter number variable] space em space [variable chapter title] [page number variable] em > for front

    The only thing I can get to watch right up to now is:

    < chapter title variable then em space > < page number variable >

    Thanks in advance-

    YC

    What do you use for your page number variable? You should use a "marker of current Page" fom the Insert menu, so your first string would look like:

    [Course marker in page] BookTitle em space (the title is not a variable, is it?). No running head variable at all, unless it is used for the title.

    Your second string should look like:

    [Chapter number variable] space em space [chapter title varies] em [marker in page courses]

    You shouldn't try to embed a variable, or spaces, inside another variable. Maybe I am misinterpreting your sharp hooks?

    Peter

  • Event inside the loop 'for' confusion

    Hi all

    I have an event inside a N = 2 for the loop, which generates an array of 2 elements (auto-index mode). The first value is a first event, the second of the second round. The events are the mouse clicks on a front panel with many buttons control.

    Am I able to access the i counter inside the front loop of 2 elements output table? He does not appear.

    Maybe I want just 2 events in the order I should put two copies of this event in a sequence of 2 image... but it creates the need to set up the event twice... a concern, because it contains many possible sources.

    Ive tried everything in loops, by the way I like a local variable, tunnels, shift... registers but I don't seem to be able to access I have during the loop.

    Can anyone suggest a method or a better structure/approach for this issue.

    In any case, it seems that the program is blocked waiting for the second round, so I can't do anything with the value anyway?

    I want to take action after the first test and before that I'm waiting for the second event.

    Thank you

    Carloman

    OK, you're much too complicated things dong.

    • Use a unique event for all low Boolean mice, then use the ctrlref of output event to detect only one. For Boolean values, you can use an array of Boolean instead of all these individual buttons.
    • Don't do the "table of cluster... unbundle" songs and dances. It's just ridiculous! 'array Index' is sufficient.
    • You need an event for the stop button.
    • The structure of your outdoor sequence has no purpose.
    • The coloring is registered with VI, no need to recolor with each race.
    • Do not reproduce any of this code. Your internal matter differs only in a constant of the diagram, it's everything that belongs inside the case. The "subset of table to replace" belongs to the outside.
    • Now, simply do the processing in a new event and ignore if the State isn't fair. Modify if needed.
  • Oracle 11g: engage inside the outer loop or loop

    Hello

    Could someone pls help in this regard.

    My PLSQL program retrieves approximately 400 000 thousand records in cursor loop and cl, it takes more than 4 hours to complete IT.

    I commit every transactions inside the cursor loop... This can affect the runtime performance?


    Also, pls suggest, can we use commit 400 000 transactions once it will be faster? (or) the performance of baskets longer than the current situation.


    My goal is to make the fastest program and expect to reduce the timing of execution of 4 hours to 1 hour...


    Appreciate your help...


    Program design: advice:

    a. Select 400 000 thousand documents in the cursor.

    b. inside cursor for loop to two new sql instructions written to get values and store it in the local variable (this value is used in the call to insert data), two sql statements are handled with no_data_found and too_may_rows logic implicit sql statements to intercept the errors of the company

    c insert statement.

    validation of d. inside the loop (batch mode: nowait)

    management at the level of the procedure using raise_application_error exception e...

    Do not use the PL/SQL for data processing. SQL is a powerful language. Get the best out of him.

    Here is an example of using INSERT ALL. This is untested code and may contain syntax and semantic errors.

    insert all
      into medicomread.aatable_permit_people
      (
            permitnum
          , lic_num
          , lic_type
          , bus_name
          , addr1
          , addr2
          , addr3
          , city
          , state
          , zip
          , ph1
          , ph2
          , fax
          , bus_lic
          , lic_original_issue_date
          , expiration_date
      )
      values
      (
            appt_ref_no
          , lic_num
          ,'Business License'
          , company_name
          , postal_address
          , null
          , null
          , null
          , emirate
          , po_box
          , telephone
          , null
          , fax
          , license_no
          , issue_date
          , expiry_date
      )
      log errors into err$_aatable_permit_people ('INSERT1: HEALTH CARD SPONSOR DETAILS') reject limit unlimited
      into medicomread.aatable_permit_people
      (
            permitnum
          , tt_contact_type
          , name
          , b1_contact_nbr
      )
      values
      (
            appt_ref_no
          , 'Applicant'
          , cname
          , userseqno
      )
      log errors into err$_aatable_permit_people ('INSERT2: HEALTH CARD BUSINESS USER DETAILS') reject limit unlimited
      into medicomread.aatable_permit_people
      (
            permitnum
          , tt_contact_type
          , B1_Contact_Nbr
          , Name
          , gender
      )
      values
      (
            appt_ref_no
          , 'Individual Health'
          , userseqno
          , patient_name
          , ***
      )
      log errors into err$_aatable_permit_people ('INSERT3: HEALTH CARD APPLICANT USER DETAILS') reject limit unlimited
    with t1
    as
    (
     select mr.appt_ref_no
          , mr.sponsor_name
          , substr(mr.PATIENT_NAME,1,79) PATIENT_NAME
          , mr.***
       from medicomdata.mc_register mr
          , medicomdata.mc_process_type_register mptr
          , medicomdata.um_users uu
          , medicomdata.um_companies uc
      where mr.patient_id     = mptr.patient_id
        and mr.pro_id         = uu.user_id
        and mr.facility_id    = mptr.facility_id
        and mr.process_type   ='OH'
        and mr.regn_status    = 5
        and mr.sponsor_name   = uc.company_name
        and uu.type_id        = 3
        and (add_months( mptr.issued_date, 12 )-1) > sysdate
    ),
    t2 as
    (
     select decode(ucr.license_category_id,'DED','DED'||uuc.license_no,uuc.license_no) lic_num
          , uuc.company_name
          , ucr.postal_address
          , ucr.emirate
          , ucr.po_box
          , ucr.telephone
          , ucr.fax
          , uuc.LICENSE_NO
          , ucr.issue_date
          , ucr.expiry_date
       from medicomdata.um_companies uuc,medicomdata.company_registration ucr
      where uuc.license_no=ucr.business_license_number
        and uuc.inactive=0
        and upper(ucr.request_status)=upper('true')
    ),
    t3 as
    (
     select uu.company_name
          , cname
       from (
             select uu.first_name ||' '|| uu.last_name cname
                  , row_number() over(partition by uu.company_name order by decode(usr.service, 'HCDC', 0, 1)) rno
               from medicomdata.um_users uu
                  , medicomdata.user_service_request usr
              where uu.user_id      = usr.user_id
                and usr.service     = 'HCDC'
                and uu.type_id      = 2
                and uu.inactive     = 0
             )
      where rno = 1
    )
    select t1.appt_ref_no
         , t1.patient_name
         , t1.***
         , t2.lic_num
         ,'Business License'
         , t2.company_name
         , t2.postal_address
         , null
         , null
         , null
         , t2.emirate
         , t2.po_box
         , t2.telephone
         , null
         , t2.fax
         , t2.license_no
         , t2.issue_date
         , t2.expiry_date
         , t3.cname
         , companyuserseq.nextval userseqno
      from t1
      join t2
        on t1.sponsor_name = t2.company_name
      join t3
        on t1.sopnsor_name = t3.company_name;
    
  • animation inside the symbol depends on the click counts

    Hello

    for example, there is a hammer striking the rock

    If I clicked 1 time - cracked rock (animation inside the symbol)

    twice - destroyed semi

    Triple - completely destroyed

    I have tryied this but it plays all the animations at the same time:

    -Make stop() end of each animation

    -by clicking on the symbol:

    var i = 0

    i ++

    {if(i==1)}

    Play('1000')

    }

    i ++

    {if(i==2)}

    Play('2000')

    }

    and so on

    but he plays any animation

    where is the error? =)

    Hello

    Here's a demo file: incrementingButtons.zip - Box

    I use a global variable. I put it with the Panel of compositionReady: sym.setVariable ("i", 0). You can also use the creationComplete Panel.

    Then I increment in a panel of the event (for example: click): sym.setVariable ('i', sym.getVariable ("i") + 1);

  • access to the original inside the proxy service message

    I have the proxy (serviceType = Web Service, WSDL) service that is available to the client endpoint and I want to record the incoming message to the file on the disk. However, I want to persist any incoming message exectly (at the byte level) as it was sent by the sender (so with the envelope).
    Inside of the proxy service I have access to variables such as header, body etc. However, they are not good for my purpose because they differ from the corresponding parts of the original message. For example xmlns:soapenv = namespace "http://schemas.xmlsoap.org/soap/envelope/" in the original message
    defined only at the level of the envelope and not the header or body. But in the header and body available inside the proxy service variables they (namespaces) are visible. Mayby there are more differences, but this one is visible at a time.
    It is therefore possible to access (in order to save it) original message somehow? Any magical variable? Or mayby there is a way of saying the osb to be persisted (incoming query) in file? (it would be enough for me (of course I need file name).) I manage file by myself more far away).
    All advice appreciated

    If you choose the type of service that WSDL based or service of any SOAP, then OSB motor deconstruct the incoming SOAP envelope and complete parts of the envelope (header, body etc) to automatically correct context variables. This occurs before the flow of messages of proxy service is initiated, so you can't do anything. In the proxy service, you will receive the deconstructed only SOAP message.
    If you wish to record the exact message that has been received by the OSB, then change the type of service to (or create another proxy service in front of the existing proxy) type Messaging with text or binary content. Or you can also choose AnyXML service type, in which case the incoming SOAP envelope will be available inside variable $body in mail flow.

  • Select the event inside the nested symbol does not

    It's actually based on a previous thread located here: http://forums.Adobe.com/message/5596353#5596353

    I thought about adding to this thread, but in many ways it deserves it's own separate discussion.

    I used the Zaxist examples and AMULI put in place successful. On a navigation bar located directly in the root.

    Now, the question is the same thing with a menu that is nested inside a symbol.

    In my example, I have a button that when you click on anime a symbol of navigation bar down. This works. Also, the LINK button retains its background color set to black until the user clicks another button in the main navigation bar. OK, he has no other button in this example. So just pretend and believe me, it works.

    Now in the nested clip, there is a similar function I Illustrazione in the compositionReady. Then I added my actions to each of the four buttons inside the symbol navlink nested. The rollover/rollover effects work well. But the click event shows an error. It is basically the same click event in the navigation bar on the root, which does not have an error.

    My code inside the compositionReady is;

    Reset the State of each button

    buttons = {}

    Reset: function() {}

    sym.getSymbol("btnLink").$("back").css ({"opacity": "0"})

    }

    }

    which button?  Zero means no!

    We set this variable to get know e what button

    WB = 0;

    Reset each State buttons Sub

    buttonsub = {}

    Reset: function() {}

    sym.getSymbol("btnCommunication").$("back").css ({"opacity": "0"})

    sym.getSymbol("btnIndividuality").$("back").css ({"opacity": "0"})

    sym.getSymbol("btnCreativity").$("back").css ({"opacity": "0"})

    sym.getSymbol("btnInclusivity").$("back").css ({"opacity": "0"})

    }

    }

    which button?  Zero means no!

    We set this variable to get know e what sub button

    SB = 0;


    I would like to only it where there are two functions. One for all main buttons and the other for all the buttons of the child. This way I can have two buttons stuck to the hover effect when you click them in order. If all goes well, that makes some sense.

    Here is my event click in the button "btnIndividuality" inside the symbol navLink nested:

    buttonsub. Reset();

    sym.getSymbol("btnIndividuality").$("back").css ({opacity: 1})

    SB = 1;

    The other three buttons are basically the same.

    So I tried a number of ideas. Especially goes directly from the stage and drilling down into JQuery. Nope.

    So the Firebug error is 'Javascript error in the event handler. Type of event = 162 item line ' we of edge.2.0.0.min.js. It's this line:

    function (a) {if (a) {if(!this.aSymbolInstances) this.aSymbolInstances = []; this.aSymbolInstances.push (a.getSymbolElement ())}}; Y = Function (a, b, c) {function f (c, b) {if (b.length > = 2 & & typeof b [0] = 'object' & & typeof b [1] = 'object' & & b [1] .Guy! == "onError") {var e; e = d.Event ("onError"); if (g) e.compId = g.getComposition () .compId; e.originalEvent = b [1]; d (doc indicator) .triggerHandler (e)} window.console.log ("Javascript error in the event handler.}} Type of event = "(+a)} var e = this [b [0]], g;" = If (typeof e = "function") if (b.slice (1), a = 'element') return function() {var;

    Why would I get this here and not on the root? What is the correct path to make it all work? If close, but not home right now.

    Files are located in:

    https://www.dropbox.com/s/xlgfeeyam9hyuf3/nested.zip

    Oops! Sorry, without my knowledge, that it was published before it is completed

    (3) thus, using Firebug, you get this when you trigger a click event

    In other words, sym.getSymbol ("btnCommunication"), the first statement in your buttonsub.reset function fails.

    In your mind, sym points to the instance of navLink, parent of the instance of btnCommunication.

    But the buttonsub.reset function is defined in the compositionReady event handler, so when it runs sym points until the symbol of the scene, which has no child symbol instance named btnCommunication. Where the bug.

    Therefore, the context of symbol should be past to the function as a parameter. Set it like this:

    buttonsub = {}

    reset function: ( symClick)

    {

    symClick.getSymbol("btnCommunication").$("back").css ({"opacity": "0"})

    And call it like this:

    buttonsub. Reset ( sym);

    In other words, the formal parameter symClick will receive as the effective setting, this actually sym sym pointing to the instance of navLink.

    Gil

    .

  • using Record statistics for session/Interface inside the package

    Oracle DB / ODI.
    I have a package starting with Interface.
    In the second step, I want to know how many records has been inserted/updated the first interface. Let that say those numbers will be used on the second interface.
    How can I do? Is it possible to access this information inside the package?
    Something similar to SQL % ROWCOUNT in ODI?

    Try this in variable refresh

    Select to_number (< %="odiRef.getPrevStepLog("INSERT_COUNT")%">) + to_number (<%=odiRef.getPrevStepLog("UPDATE_COUNT")%>) of the double

  • Table statement fails inside the class

    When I try to run the following code, I get the error:
    1120: access of undefined property myArray. for lines 4, 5, 6 and 7.
    This code is copied from the Adobe documentation and works if it is placed directly in a frame. Declare a new object will fail in the same way inside the class. But another class of upper level new Date works as expected. What I'm missing here?

    variable declarations are doing inside a class definition. variable assignment must be made within the constructor of the class that you are missing...

    {Classes package
    public class TryArray {}
    var myArray:Array = new Array (); \
    public void TryArray (): void {}
    myArray.push ("one");
    myArray.push ("two");
    myArray.push ("three");
    trace (myArray);
    }
    }
    }

  • How to use getvariabledata inside the transform task?

    I try to use the getvariabledata of xpath inside a transform task function, but I'm unable to general relativity the value.

    < db:P_MIGRATION_ID >
    < xsl: value - of select = "string (bpws:getVariableData('inputVariable','/client:IRobo_Workflow1ProcessRequest/client:MIG_ID'))" / >
    < / db:P_MIGRATION_ID >


    Here I rolled inside a string, I tried to wrap inside the ora: parseEscapedXML() but it does not work also. Kindly help.

    Y at - it another way to get the value of a variable within the transformation.

    The best way is to enter the MIG_ID in the XML source.

    You may need to create a new xsd / variable to manage this new variable.

    You don't need like one for each you can assign to a level of header, then the transformation map it on the target which is to everyone.

    see you soon
    James

  • Does someone have a MagSafe 2 power adapter whose serial number is located inside the space where the two pins?

    Hi guys!

    I want to know if the power adapter of MagSafe2 that I just bought is genuine or counterfeit.

    I bought a MagSafe2 power adapter that has its serial number located inside the space where the two pins. Its model # is A1424. All the power MagSafe adapters I've seen always have serial number located under the round metal head big (I guess it's called head male or female?). Please see photo for reference.

    If any of you have or had any Apple Store, can you let me know?

    Thank you!

    My 85 Magsafe is exactly identical to your image.   It was 'inside the box' with a new MBP computer.

  • Cannot scroll inside the drop down Menus

    I just got a new laptop (Windows 7 Home Premium 64 bit) HP, installed Firefox 11 (now updated to 12) and discovered that when using the touchpad (Touchpad Synaptics v8.1. Driver provided by Synaptics, version 15.3.29.0 as of 10/13/2011), I can't scroll inside the drop down menus.

    To replicate, go to this link: http://sacramento.craigslist.org/sss/

    Click on the drop down menu to the search category. Use the touch pad to scroll through the list. Mine closed list and returns focus in the browser instead of scrolling of the list. It then scrolls the window of the browser instead. This works fine in IE. I tried the things:

    Safe mode
    Unchecking scroll smoothly
    Uncheck auto-scroll
    Uncheck the hardware acceleration

    And about all the various combinations of the above things. I also tried to restart Firefox every time I made a change. Nothing seems to solve this problem.

    Oddly enough, if there is a window of text within the page (as I write this), I can scroll than fine. Once I move my mouse out of the box, it scrolls the homepage very well. I don't think that it is a matter of the development following the mouse, there something to scrollable drop-down boxes that specifically seems.

    Also, I must point out that all the pages I have problems with work well in IE how they SHOULD work in Firefox.

    I had this exact problem, the same features of HP and the driver Synaptics. I went to synaptics site and downloaded their latest driver which is lower 15.3.29.0 for some reason any. There 15.2.20, I got this one for 64 bit since that's what I have. You must uninstall the 15.3.29.0 first because it is "newer". He now works properly in FF and IE and everything else. If for any reason any the last FF has a confrontation with the latest version of the synaptics driver and FF devs had to include a fix in the next patch.

  • HP 24-g080na all-in-one: disk lost inside the PC

    I put a dvd in the drive and it should not have been broken in properly because I heard him fall into the machine.

    I have no idea how to do to get it out again, (searched forums and found a similar topic in this section, but different model PC instructions so unnecessary!) or if it will do no harm, although it is there :/

    Thanks in advance for any help!

    Hi there @Rebecca89,

    Welcome to the Forums of HP Support!  I understand that a DVD came loose and dropped inside the DVD player or on your computer.  I'm happy to help you with this.

    You can try to remove the DVD drive and see if you can get the disc from the drive, if this is where he is, or open the computer to gain access to the drive if it is in your case.  Please see maintenance and Upgrade Guide that is in several languages, but has illustrations on how to open the case and remove the DVD drive.

    Please let me know if it works for you and if it does not solve your problem, please mark this message as a solution. Bravo would be appreciated as well.

  • Information inside the urlclassifier.sqlite

    Does anyone know if this file can be of any help, trying to find the browsing history? He was erased on my PC and it is the only file that has not been affected.

    Also, when the Firefox cache is deleted, can it be moved using a hard disk removal tool?

    The data are collected inside the places.sqlite file and because there is no function cancel as when editing a document, the data is permanently lost. Sorry to say this, but I think the only chance would be a backup or an earlier version.

  • My Tablet stolen inside the car to Boisar

    My bag stolen inside the car to Boisar (Thane, Maharashtra) and my Tablet has the inside of the bag, I have a complaint, but you know how our police service is, so please track my Tablet using the IMEI number and help me get it back. That will offer you the IMEI number please contact [personal information deleted]

    Thank you

    Hi @Salmansk

    I just sent you a private message. If you are unsure how to check your messages from the forum, this post has instructions.

Maybe you are looking for