I can't get a value from a list of CFDIRECTORY.

I avoided the madness all these years, but this issue was finally on the brink.  My placement in an institution is in your hands.

I try to get the name of a specific directory to the list of directories produced by action CFDIRECTORY = 'list '.  But everything I try fails in one way or another.  Bascially, I can't get the value of the structure - even if the code IS the value - because he thinks that the value is meant to be a field or a key.  (The server running CF8).

These lines of code work fine:

<!-do and loop through the list of local directories. ->

< CFSET LocalDirectoryList = "" > "".

< action CFDIRECTORY = 'list' name = "LocalDirectoryList" TYPE = "dir" directory = "#PathOfLocalFolderToCopyToRemoteFolders #" >

< CFIF IsDefined("LocalDirectoryList.RecordCount") AND GT LocalDirectoryList.RecordCount '0' >

< request CFLOOP = "LocalDirectoryList" >

Now comes the killer.  I want to set a variable whose value is the name of the local current directory - in other words, the value of LocalDirectoryList.Name for each loop the loop.  But if I try to access LocalDirectoryList.Name as a string variable simple, the way I usually for a query string variable-

< CFSET ThisLocalDirectory = LocalDirectoryList.Name >

-I get a message "you have attempted to dereference a scalar variable of type class java.lang.String as a structure with members.

However, if I treat the "LocalDirectoryList.Name" as a structure and try to deconstruct with one of the following conditions.

(1) < CFSET ThisLocalDirectory = Evaluate (LocalDirectoryList.Name) >

(2) < CFSET ThisLocalDirectory = ' #Evaluate (LocalDirectoryList.Name) # ">

(3) < CFSET ThisLocalDirectory = ' #StructFind (LocalDirectoryList, Name) # ">

(4) < CFSET ThisLocalDirectory = StructFind (LocalDirectoryList, name) >

(5) < CFSET ThisLocalDirectory = ' #Evaluate (StructFind (LocalDirectoryList, name)) #">".

I get either "horizons variable is not defined" (for 1 or 2) or "the specified key, backgrounds, does not exist in the structure" (for 3, 4 or 5).

In this case, the name of this directory is "horizons."  If the value I'm looking for do EXIST in the structure of 'LocalDirectoryList '.  And the code IS that IT is.  But he thinks it is the NAME of a key, rather than the VALUE of the key.

Note: The addition of the attribute, listInfo = "Name" to the CFDIRECTORY tag limit fields returned, or key, "Name", but LocalDirectoryList.Name is still a structure, and I still get the same results.

I'll be the next cuckoo in the cuckoo's nest?  Or can you save me and keep me sane?  My fate is in your hands.

Thank you!

You don't need the evaluate statement (in fact you probably shouldn't need to use than ever at that time). And inside the loop of your application, you can send all your query without prefix fields.

When in doubt, empty your query of cfdirectory.

Tags: ColdFusion

Similar Questions

  • How can I get a value from a function from pl/sql by OADBTransaction

    Hi all
    Hope you will be fine.
    as we know, we can get a sequence by this code value:
    Super.Create (AttributeList);
    Transaction OADBTransaction = getOADBTransaction();

    Vendor ID is obtained from the table sequence
    Number supplierId = transaction.getSequenceValue ("FWK_TBX_SUPPLIERS_S");

    My question is how can I get a value in a variable to a pl/sql function:
    the function is defined as follows:
    ******
    create or replace function getNextTrans return varchar2
    is
    Team varchar2 (20);
    Start
    SELECT "CASH". TO_CHAR (SYSDATE, 'DDMMYYYY') | GP_CASH_TRX_SEQ. NEXTVAL FROM DUAL;
    return team;
    end;
    /

    Hey Dina,

    Reference http://www.oraclearea51.com/oracle-technical-articles/oa-framework/229-calling-database-procedures-and-function-from-oaf.html

    Kind regards
    GYAN

  • Getting a value from selectonechoice

    Hello

    I use Jdeveloper 11.1.1.6

    My requirement is as below

    I have a component selected only one option, which displays a list of values.

    The user selects a value from the list of value and clicks the command button, and then the input field should be updated with the

    the value that is selected in the list.

    To do this, I wrote the code (no components company involved / only ADF faces) below

    I am able to get the list of values and post it on my page. For the rest of the game, I am not able to guess.

    I put selectoncechoice partialtriggers for buttons and the text in field

    All I need is the java code for getting the selected value and by attaching it to the text field.

    Can you help or guide me on this...

    Bean:

    The list < SelectItem > tempList.

    {} public void settempList (list < SelectItem > tempList)

    this.tempList = tempList;

    }

    public list < SelectItem > gettempList() {}

    If (tempList == null) {}

    tempList = new ArrayList < SelectItem > ();

    tempList.add (new SelectItem ("t1", "Item 1"));

    tempList.add (new SelectItem ("t2", "Item 2"));

    }

    Return tempList.

    }

    USER INTERFACE:

    <? XML version = "1.0" encoding = "UTF - 8"? >

    " < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"xmlns:f =" " http://Java.Sun.com/JSF/core "

    ' xmlns:af = ' http://xmlns.Oracle.com/ADF/faces/rich "> "

    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

    < f: view >

    < af:document title = "listPage.jspx" id = "d1" > "

    < af:form id = "f1" >

    < af:panelGroupLayout id = "pgl1" layout = "vertical" halign = "center" >

    < af:spacer width = "10" height = "10" id = "s1" / >

    < af:selectOneChoice label = "Custom List" id = "soc1" contentStyle = "make weight:" BOLD "; color: Green; ">

    < f: selectItems value = "#{Valuesbean.tempList}" id = "si1" / > "

    < / af:selectOneChoice >

    < af:outputText value = "Output text" id = "ot1' partialTriggers ="soc1"/ >

    < af:commandButton text = "Change" id = "ot1' partialTriggers ="soc1"/ >

    < / af:panelGroupLayout >

    < / af:form >

    < / af:document >

    < / f: view >

    < / jsp:root >

    Hello

    If you see:

    You must set a value for the selectOneChoice component. You add a new variable in your beans to use it to store your selectedItem. Then your output text should also reference the same attribute in its value field.

    Try to add in your bean:

    String mySelection;

    public String getMySelection() {}

    return mySelection;

    }

    {} public void setMySelection (String, string)

    mySelection = string;

    }

    value = "#{ValuesBean.mySelection}" label = "Custom List" id = "soc1" contentStyle = "make weight:"BOLD"; color: Green; » >

    and value = "#{ValuesBean.mySelection}" id = "ot1' partialTriggers ="soc1"/ >"

  • How can I get the value of the element checked a box to tick LOV?

    Hi all

    I need to insert rows into a table when a checkbox element is checked.
    The checkbox element is a LOV in a form.
    -----------------------
    Select the DESCRIPCIÓN display_value, ID_DOCUMENTO return_value
    of DOCUMENT
    order by 1
    ------------------------------

    Source
    ------------------------------
    DECLARE
    CURSOR C_REG_DOC IS SELECT ID_DOCUMENTO FROM REGISTRO_DOCUMENTO WHERE ID_REGISTRO =: P6_ID_REGISTRO;
    v_id_documento documento.id_documento%TYPE;
    v_results VARCHAR2 (50);
    Boolean v_first_loop: = true;
    BEGIN
    for this loop C_REG_DOC
    If v_first_loop then
    v_results: = it.ID_DOCUMENTO;
    v_first_loop: = false;
    on the other
    v_results: = v_results |': ' | it.ID_DOCUMENTO;
    end if;
    end loop;
    Return v_results;
    END;
    --------------------------

    I need to create a process to insert rows in a relational table, but I do not know how...
    ------------------
    FOR *? *
    LOOP
    INSERT INTO registro_documento (id_reg_documento, id_registro, id_documento)
    VALUES(null,:P4_ID_REGISTRO,???);
    END LOOP;
    ---------------

    How can I get the value of the active element (id_documento) to insert it?

    Thank you!

    Alex

    Hello:

    You can use the apex_util.string_to_table function to retrieve the values of the LOV as shown in the example

    declare
    arr wwv_flow_global.vc_arr2;
    begin
    arr:= apex_util.string_to_table(:P_CHECKBOX_LOV_ITEM)
    for x in arr.first..arr.last loop
    // insert statement
    iNSERT INTO registro_documento( arr(i) ,.........id_reg_documento,id_registro,id_documento)
    end loop;
    end;
    

    CITY

  • How can I get the message from thunderbird to stop coming when I opened my email?

    How can I get the message from thunderbird to stop coming when I opened my email?

    Press the alt key to make the call of menu bar
    Select Tools-Options-general
    Disabled the Start Page

  • My iPhone password 5 had been blocked. Can I get immediate assistance from Apple Support?

    I use the iPhone 5 for sometimes and still getting used to it. My iPhone 5 is now locked password. I couldn't find a way to unlock the password, reset the phone and install the updates of the application. All support them? Can I get immediate assistance from Apple Support instead of trying to get the queries and responses via blog sites?

    Connect iPhone in recovery and restore via iTunes Mode

  • How can I get my pictures from my Bloggie TS10 on a flash drive or a memory stick?

    How can I get my pictures from my Bloggie TS10 on a flash drive or a memory stick

  • Satellite 5005-S504: where can I get a driver from his BACK?

    How do noise at work in DOS? Where can I get a driver from his BACK?
    Audio chip is Yamaha YMF753.
    Help, please!

    Thank you...

    Hello

    Unfortunately, you won't find all the BACK drivers for this device.
    I put t know why you need these drivers, but as far as I know there is no drivers BACK.

    Just FYI: perhaps a compatible Sound Blaster BACK driver works but I n t think so. Google a bit for this kind of audio driver.

  • After having my system repaired, I can't have my mobile data card (wireless broadband modem) to operate. I can't get any service from the server.

    TBS wide BAND WIRELESS MODEM data

    I had to have my computer repaired, now I can't get my mobile card data (wireless broadband modem) to operate. I can't get any service from the server. I called them and they said that when the laptop has been repaired. The Ports were not tied and cannot open anything. All other elements of work of these ports (wirelsee mouse/printer and I explained this to the technician, it is only thought was to call in a repair service.) I think their answer is like the auto machnic said to go and change the air in your tires. Can you give me any advice?

    Hello

    I suggest you to stay in touch with your Internet service provider.

  • Update problems, I just reinstalled XP pro and I can't get the updates from the windows update web site

    I just reinstalled XP pro and I can't get the updates from the windows update web site. Whats up with this please help

    There is no way that anyone might be able to help without more. My initial guess and it is just a guess, is that you have to update Internet Explorer .v8. Click HERE and download IE8 and install it. Try again updates once the installation is complete.

  • I paid for software that is not downloadable, because I have vista. Can I get a refund from Microsoft?

    I paid for software that is not downloadable, because I have vista. Can I get a refund from Microsoft?

    Hello

    This is not Microsoft

    you don't say what the name of the software

    and there's an old saying: "buyer beware."

    and read this;

    always check the compatibility of vista programs on the link below

    http://www.Microsoft.com/Windows/compatibility/Windows-Vista/default.aspx

    If a program is compatible with vista you can try right click on the setup.exe, and then selecting run as administrator

    It is not compatible with vista, you can try running it in a previous operating system mode

    This does not work for all programs

    read the information below

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-compatibility-mode/

  • How can I get my pc from freezing while configuring updates: stage 3 of 3-0% complete

    • How can I get my pc from freezing while configuring updates: stage 3 of 3-0% complete

    Hello

    • That you update you are installing?

    You can use the following methods that can help you solve your problem:

    The update is not installed successfully, you receive a message, and the computer restarts when you try to install an update in Windows Vista and Windows 7

    http://support.Microsoft.com/kb/949358

    I suggest you follow the method 1,2 in link above.

    Note: The article applies well to an another update, it should help in this case also.

  • Where can I get my information from pop3 to set up my e-mail account?

    Original title: "windows mail"

    How can I set up mail windows using windows vista? where can I get my information from pop3 to set up my e-mail account?

    Thank you

    How can I set up mail windows using windows vista? where can I get my information from pop3 to set up my e-mail account?

    Thank you

    http://www.SimpleHelp.NET/2007/02/07/a-beginners-guide-to-setting-up-Windows-Mail/

    Link above has an easy to follow Guide to set up Windows Mail.

    Contact your ISP (Internet Service Provider).

    They offer your broad band/Dial-up connection.

    Ask them to:

    username
    password for your service account to wide band/Dial-Up with them

    Server of incoming POP3 mail
    outgoing mail SMTP server

    The above information is required to set up Windows Mail.

    ISPS are usually happy to help you set up your email account.

    See you soon.

    Mick Murphy - Microsoft partner

  • How can I get my email from windows live to automatically remove once downloaded in outlook

    How can I get my email from windows live to automatically remove once downloaded in outlook

    http://www.Microsoft.com/communities/newsgroups/en-us/default.aspx?DG=Microsoft.public.Windows.live.mail.desktop

    Discussions in Windows Live Mail Desktop

    They will help you in the above discussion group.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Or try here:

    Outlook:

     

    http://answers.Microsoft.com/en-us/Office/default.aspx

    Office at the above link forums

    http://answers.Microsoft.com/en-us/Office/ee861097.aspx

    Outlook Help Forums at the link above.

    They will help you with your Outlook questions when repost you in the Office Forums above.

    See you soon.

    Mick Murphy - Microsoft partner

  • I have just reactivated Dreamweaver on a new computer.  How can I get the files FROM my website ON my computer so I can edit/update using Dreamweaver.

    I have just reactivated Dreamweaver on a new computer.  How can I get the files FROM my website ON my computer so I can edit/update using Dreamweaver?

    If your old machine still works, export your definition of original site to a portable player, copy in your new machine and then import the site definition to the new machine. The definition file will have the extension .ste

    Create an empty folder on your new machine.

    Define a 'new' web site on your new machine to point to the new local root folder.

    Log your server and download all of the subfolders and files in the folder root from the server to the new local root folder.

Maybe you are looking for