Populate List/Menu in Update Record form

I am creating an update record form that contains a list/menu
(with values General, 2002, 2004, 2006)
How do I populate this menu so that it pulls current value
from database, and not just the top default value each time?

Swn-Y-Mor wrote:
> I am creating an update record form that contains a
list/menu (with values
> General, 2002, 2004, 2006)
>
> How do I populate this menu so that it pulls current
value from database, and
> not just the top default value each time?
Select the menu object in the form. Then click the Dynamic
button in the
Property Inspector. In the dialog box that opens, click the
lightning
bolt next to Select value equal to. Finally, choose the data
field from
the correct recordset.
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Update record form

    Hello all,
    I've got an update record form on one of my pages (it is a
    php site). I followed the tutorial in dreamweaver 8, but it does
    not work like I want it to work.
    I am hoping that when a user logs into the site, and they
    want to update their information, they will be redirected to a page
    that has a form. This form has all the text fields blank, except
    for thier username (which is not editable). The rest of the fields,
    they can enter as many as they want. The fields that are left blank
    will have no effect on the record in the database.
    How it is now, I've got to have them retype in their username
    and password, then the form fields populate, but if they make a
    mistake and erase a field, then that field is deleted in the
    database.
    Is there a tutorial that I have not found yet that I can
    learn how to do this?
    Thank you

    Hi,
    If you dont want the Dreamweaver to update your dependent files, Just go to the "Edit -> Preferences" menu, In the preferences dialog click on the "Site" category which can be seen in the left panel, and there you might have some options for setting the "Dependent files" preferences, just check out the "Get/Check Out" and "Prompt on Put/Check" options.
    I hope this might fix your issue.
    HTH

  • Where is the update records form wizard in dreamweaver cc?

    Where is the update record form wizard in dreamweaver cc?
    Does anyone know of a website or a reference manual about dreamweaverCC?  every example and tutorial online are mostly about older versions of Dreamweaver.  Some brainiac at Adobe thought, why don't we change the whole freaking interface around so nobody can figure out where anything is anymore with the new version....&^$@^#$^^

    Simply choose Server Behaviours --> + --> Update Record

  • Update record form wizard

    I am having problems with inserting update record forms and
    Custom From from the wizards into php files i am using Dreamweaver
    cs3 and Developer Toolbox.
    An Insert form works OK.
    The Update Form inserts into the page and can be accessed
    from the server, bit on attempting to update database I get the
    following message:
    quote:
    Developer Details:
    tNG_update.prepareSQL:
    No Primary Key Column was set. (UPD_NO_PK_SET)
    quote:
    tNG Execution Trace - VIEW
    * tNG_update.executeTransaction
    o STARTER.Trigger_Default_Starter
    o tNG_update.doTransaction
    + BEFORE.Trigger_Default_saveData
    # tNG_update.saveData
    + BEFORE.Trigger_Default_FormValidation
    + tNG_update.prepareSQL*
    o tNG_update.getRecordset
    o tNG_update.getFakeRsArr
    o tNG_update.getLocalRecordset
    o tNG_update.getFakeRecordset
    /Q]
    When using the Custom form wizard (inset and update) and
    {else} statement is inserted into the code and only the 'insert'
    button appears when I require 'insert', 'update' and 'delete'.
    Has anyone else experienced this - is there something I am
    not doing?

    Hi Glenn, I kept having the same problem this morning. What I
    finally figured out is that I wasn't using the session variables
    properly. For example. My user_ID field maps to the session
    variable name kt_login_id
    my email field maps to kt_login_user (I use my email as user
    name) and password is kt_password. I finally printed out the
    Session information from login settings in the control panel so I
    was sure to fill out the data in the update wizard correctly.
    Open up the Update Transaction panel and under the Fields
    Tab, you can see how your table fields are mapped to the session
    fields. Hope it helps.l

  • Dynamic List/Menu After Update

    Hi All,
    Dreamweaver - ASP
    I have a form to add records. The first field is a dynamic list/menu to select the date.
    After the Add record button is pressed the page reopens but the date menu has reverted to "Select date"
    Is there a way to retain the previously chosen date when the page refreshes?
    Many thanks
    John

    Hi All,
    Solved the problem.
    I set  up a session variable for the date and then used the 'Dynamic' button for the List/Manu, Select Value equal to,  and selected the session variable.
    Regards
    John

  • Update Record Form Wizard Not Working

    This is my first attempt at creating dynamic pages via asp and microsoft access. However I think I've done pretty well for my first go around. Any help would be so greatly appreciated as I've only got 5 hours of sleep in the last 2 days.
    I'll try to explain what I did and what's happening. For anyone that may be interested in helping me out, here are the test account login credentials:
    username: username
    password: password
    My property update will not post to the database. Upon clicking update record I get a 500 Internal Server Error. To see an example of whats happening login by going to http://www.rentalpaypro.com/members/index.asp.
    Then click on the link "Update Monthly Rent and Delete Properties", click on a Property ID and then click update record.
    This is where the error appears and I can not for the life of me figure out what I've done wrong. I'M BEGGING, CAN SOMEONE PLEASE HELP ME OUT?
    Thanks,
    Ken

    Hi Ken,
    when looking at the source code of propertyupdate.asp I see that the whole form has been placed outside the document´s body, more precisely preceeding the DOCTYPE declaration.
    No clue if this causes your issue, but fixing this is certainly worthwile anyway :-)
    However, I also noticed that it´s a manually created form and not done with ADDT, and it´s been assembled using Dreamweaver´s native server behaviours (evidence: the MM_update and MM_recordId hidden fields) -- that said, I think you´d better ask this question in the regular DW application development forums.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Update record form wizard problems

    I have an update form right after my log in page, but I guess my id is not getting carried to it. So everytime a user tries to update his record it says "No Primary Key Column was set"
    I used the update form wizard to create the update form and the log in form wizard for logging in. I checked the URL parameter and selected the right field in Primary Key Column in the update form wizard. You can actually update the record if you select "entered value" in Primary Key Equals and put a number against it, but not otherwise.
    Am i missing something. Im a complete novice so any advice is appreciated.

    I see this problem posted in lots of places - hopefully this will help someone...
    I had put the form on the page myself and filled in the filename in the "action" setting for the form.
    If the wizard creates the form, it uses...
    for the action value which maintains the get parameters that you passed from the other page. The "setPrimaryKey" function then has both that GET value (so it doesn't lose track of which record it's working on) and the POST information coming in from the form.
    I couldn't understand how my page had the primary key information the first time in but not when I submitted the form... this was the reason. It never affected the insert part of things because that doesn't rely on an existing primary key.

  • Image upload / resize in "Update Record" form?

    Hi
    I've created a form to add products to a database, it includes an image field using the "upload and resize image" behavior. This works fine.
    But now I'm building the uèpdate form and want to offer users the possibility of either retaining the current file, uploading a new image to the server (and delete/overwrite the previous one if it exists) or delete the current image without uploading a new one.
    how would i go about this?
    thanks.

    Hi Waleed,
    oops, yes, sorry, you´re right of course -- just didn´t read it too carefully :-)
    However, what Somaboy and Dave want, is a little different from what the tutorial explains at this point -- what´s explained there, will of course be deleting that image physically and erasing the file name entry from the table, but that won´t cover the requirement to additionally upload another picture from the same form.
    In this special case I *think* that one would have to perform both deletion processes as "before" triggers -- to make sure that the file as such plus the corresponding table entry are really gone before the upload procedure happens.
    If someone will ever find out a well-working strategy to get this
    (BTW very often asked for) requirement done, many folks here would certainly jump for joy -- also because that´s something you apparently can´t do without implementing a chain of at least custom triggers.
    But there´s also a much easier solution available to those folks who don´t want to bother with implementing custom triggers for this purpose alone :: this is how I´d do it:
    1. use what´s described in step 3 of the tutorial you posted to delete the physical file and the "filename" column entry
    2. pass the current recordset´s ID to the "redirect after update" page, and here...
    3. add a "SELECT file_column FROM table_name WHERE ID" matches the URL parameter ID - query in order to check if this column is empty or not -- and if it´s empty, execute an "upload and resize image" behavior on this page.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Problem with update record, then link to file

    Environment:
    Dreamweaver 8, MySQL, PHP.
    I have a repeating record from my database. I added an Update
    Record server behavior for each search result for the result table.
    I added a button to the form and changed "submit" to "view".
    Pressing "view" is supposed to allow the user to view the detailed
    record information.
    The Update Record server behavior is supposed to do two
    things:
    1) add 1 to the 'numViews' filed of the record's database
    entry when the "view" button is pressed
    2) After updating the numViews field, the form is supposed to
    redirect the user to the detailed record
    I found that depending on how I create the record, I an do
    one of the above 2 behaviors, but not both. HELP!
    To add 1 to the numViews field, I created a form variable
    called incNumViews, which does the following:
    <?php echo $row_rsSearchResults['recipeNumViews']+1; ?>
    Very simple.
    The Update Record ends up changing the form action to the
    following:
    <?php echo $editFormAction; ?>
    Looking at the code for this, I ee the following:
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" .
    htmlentities($_SERVER['QUERY_STRING']);
    But when the "view" (ie: submit" button for the form is
    pressed, I get redirected back to the same repeating record search
    result page, not to the record detail page.
    However, the numViews field in the record is getting properly
    incremented.
    I tried to get around this by changing the Update Record
    behavior "After updating, go to:" field to point to the record
    detail page, and tried passing a parameter tot he recordID I want
    to see details of, as a URL parameter, but that does not work.
    If I change the Update Record form action from
    <?php echo $editFormAction; ?>
    to
    record_detail.php?recordID=<?php echo
    $row_rsSearchResults['recordID']; ?>
    Then I am able to link to the detail page, but NOT update the
    numViews field.
    HOW can I fix this to both update the record, then jump to
    the detail page with a URL parameter being passed, when I click the
    "view" (submit) button o the form??
    Thanks in advance.

    If the user's computer doesn't know what to do with a TIFF file, I guess that Open button would be missing.  Tiff is not a web normal file format, or even a common one for graphics applications....

  • List/Menu a required field

    Is there a way to make a list/menu field in a form required
    by the user to select an item from its list? I know how to do it
    for a text field but not for a list menu.
    Thanks,
    Dave

    Download the Check Form extension from www.yaromat.com as it
    has an option
    to force the person to select from a drop down and exclude
    the first item.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "Dave Blake" <[email protected]> wrote in
    message
    news:esk17i$1aj$[email protected]..
    > Is there a way to make a list/menu field in a form
    required by the user to
    > select an item from its list? I know how to do it for a
    text field but
    > not for a list menu.
    >
    > Thanks,
    > Dave

  • Ensure List/Menu populate my update form with the correct data before update

    Hello,
    Please how do I ensure my update form is populated with the correct data before update?
    On my update page I have text fields and select fields (dynamic list/menu). When I open my profile page to make updates, I see the field well positioned in the text fields but in the select list/menu fields, I see "Select from list" instead of the value that was initiated selected
    Correct Values before update
    Wrong values during update
    As you can see from the images below, when I open the update page, the list automatically populate the select fields with the last values in the list instead of the Initial values that where selected by the user before the update.
    Can anyone please review and let me know where I have gone wrong.
    Thank you
    Mike

    Hello All,
    Once more thank you. I have sorted the issue out.
    I observed that I was selecting the wrong field. I selected the field matching the record set of the select instead of the field matching the record set of the table I am working as seen on the image belew
    I was selecting this - This is the record set of the table that hold values for the city select list
    Instead of this. This is the record set of the table behind the form I am working on
    My issue is now re-solved.
    Mike

  • Creating Update and deleting Records Forms

    Hi Guys
    Hopefully some one can help me with this, I am using php and
    mysql, I already have a page that shows all the records of
    customers details, which I can navigate through the pages of
    records.
    I have created a update page, using the update wizard, which
    works but only shows the first record. I have added a repeat region
    and page navigation which allows me to choose individual records
    but wont update those records.
    I also took a look at a tutorial video that had you adding an
    extra column and add the word update to add a hyperlink that took
    you to the update form with that particular record for updating,
    the video was using cold fusion the link was update page address
    then this ?ID=#ID#, I tried different versions of this with no
    success.
    I also tried to alter the record set and added a filter using
    Member_ID and = paramater URL, this made my cusomter detail page
    stop working.
    can some one help please
    Cheers
    Mark

    burkeslaw wrote:
    > Is it that I have to create the update form manually and
    then select it and
    > add the update form behaviour? Is there an Go to
    Detailed Page server behaviour
    > for php, or is this just for ASP technology.
    I'm not familiar with the ASP server behaviors, but there is
    a Master
    Detail Page Set for PHP (it's on the Insert > Data Objects
    menu).
    Creating an update page is very easy.
    1. Create a page that lists all records in the database.
    2. Alongside each record, create a link to the update page.
    3. When creating the link, click the Parameters button inside
    the Select
    File dialog box.
    4. In the Name field of the Parameters dialog box, type the
    name of the
    primary key (ID).
    5. Click the lightning bolt icon to the right of the Value
    field, and
    select the primary key from the recordset.
    6. Click OK twice to close both dialog boxes.
    7. Save the page and test it in a browser. When you mouse
    over each
    link, it should display a URL that looks something like this:
    update.php?id=3. The name/value pair after the question mark
    pass the
    details of the record as a URL parameter to the update page.
    8. In the update page, create a recordset that uses the URL
    parameter as
    a filter to select a single record depending on the value
    sent from the
    previous page.
    9. In the update page, create a hidden field to store the ID
    from the
    recordset (click the lightning bolt icon alongside the Value
    field to
    insert the dynamic data).
    10. Apply an Update Record server behavior. Make sure the
    primary key
    gets its value from the hidden field in the form.
    Alternatively, if you don't want to build your own update
    form, replace
    steps 9 and 10 by using the Record Update Form Wizard (Insert
    > Data
    Objects > Update Record > Record Update Form Wizard).
    David Powers
    Adobe Community Expert, Dreamweaver
    http://foundationphp.com

  • Unable to update record in web Form

    Hi, i am unable to update record in a form. I am building a custom form using forms 6i and putting it on the web in oracle applications 11.5.9
    I used template.fmb as a starting point for my form. I have one datablock based on a table. Insert, update and delete properties are set to yes on the property pallete of data block. The table against which i am running the form has a primary key which is a combination of two fields. I am able to update a record with pure SQL running against the table.
    My form now brings back a record from the db like it should but whenever I try to update that record either by pressing Action Save or by clicking button that has update statement in it, instead of doing an update, it does an insert and tells me that this record already exists and that i entered value(s) that must be unique for each record. It thinks I want to insert but I want to update. What am i doing wrong???
    Update allowed value is set to Yes in all the items in the data block and at the data block level as well. Querly_only is set to no.
    What's even more frustratinng is that I've ran the form manually before starting with template.fmb and have been able to update the table but when I put it on the web and used template.fmb it stopped working!
    I am very new to forms, can anybody suggest anything? Please help!!!

    When you populate the 2nd block with a select into query, it's the same as just typing the data into the block. The record is treated as one needing to be inserted, not as one that is queried.
    To populate it using a true query, but with data from the LOV, you can do this:
    Programmatically set the default_where clause of the block based on the LOV. For example, if a name is chosen from the LOV in an item called LOV1, you could do:
    set_block_property('block2','default_where','name='''||:block1.lov1||'''');
    or if the LOV is a number, like a department number:
    set_block_property('block2','default_where','deptno='||:block1.lov1);
    The tricky part when you build your where clause is that you must surround strings with single quotes, and the way to do this is to use two single quotes to represent an actual single quote in the where clause. Otherwise a single quote is interpreted as part of the PL/SQL syntax.
    Then, just navigate to block 2 and execute a query:
    go_block('block2');
    do_key('execute_query');
    I hope this works for you. I didn't have time to test this, so I hope I didn't make any syntax errors when typing.

  • Populate list from recordset on Parent/Child form

    We have a parent/child form and want to populate several lists from recordsets. We can populate the child canvas by calling a procedure from the WHEN NEW FORM INSTANCE trigger but the same code fails when trying to populate a list on the Parent canvas. If I move the code to a PRE-BLOCK trigger on the parent block, then it works. I just kept moving the code until I found something that works. Can anyone tell me why it wouldn't work from the WHEN NEW FORM INSTANCE trigger? Is PRE-BLOCK the correct place?

    WHEN-NEW-FORM-INSTANCE trigger
    Add_Orgs_Lists('HR_PERSONS.OFFICE_SYMBOL');
    PROGRAM UNIT
    PROCEDURE Add_Orgs_Lists (list_name VARCHAR2) is list_id ITEM;
         col_name VARCHAR2(80) := SUBSTR(list_name, INSTR(list_name, '.')+1);
         sql_stat VARCHAR2(2000);
         BEGIN
         --Find ID for list item.
              list_id := FIND_ITEM(list_name);
              IF ID_NULL(list_ID) THEN
                   MESSAGE('List Item ' ||list_name|| ' does not exist.');
                   RAISE FORM_TRIGGER_FAILURE;
              END IF;
         --Build the SQL statement.
         --     message('In Get_Org');
         sql_stat := 'SELECT Distinct Org_Name, Org_Name FROM HR_Organizations
         ORDER BY 1 ASC';
         Populate_the_List(list_id, sql_stat);
              EXCEPTION
                   WHEN OTHERS THEN
                        MESSAGE('Internal error occurred in Add_Orgs_List.');
                        RAISE FORM_TRIGGER_FAILURE;
    END Add_Orgs_Lists;
    PROCEDURE Populate_the_List (list_id ITEM,
                                                           sql_stat VARCHAR2) is
         group_id RecordGroup;
         outcome NUMBER;
         --List_Elements  VARCHAR2(40);
    BEGIN
              --message('In Populate_the...');     
    --Create temporary record group.
    group_id := CREATE_GROUP_FROM_QUERY('List_Elements', sql_stat);
    IF ID_NULL(group_id) THEN
         MESSAGE('Record Group could not be created in Populate_the_List.');
         RAISE FORM_TRIGGER_FAILURE;
    END IF;
    --Populate record group.
         outcome := POPULATE_GROUP(group_id);
         IF outcome <> 0 THEN
              MESSAGE('Record Group could not be populated in Populate_the_List.');
              RAISE FORM_TRIGGER_FAILURE;
         END IF;
    --Populate list item
         POPULATE_LIST(list_id, group_id);
    --Destroy the temporary record group to release resources
         DELETE_GROUP(group_id);
    EXCEPTION
         WHEN OTHERS THEN
         MESSAGE('Internal error occured in Popluate_the_List.');
         RAISE FORM_TRIGGER_FAILURE;
    END Populate_the_List;
    The error is FRM-41337 Cannot populate the list from record group. It happens when we open the form. We are using the same code to populate the lists on the child form (except the SQL statement is different) and it works correctly.
    I appreciate your help.

  • Dynamic Form list/menu

    I'm trying to insert a dynamicly generated form list/menu dropdown item.
    Everything works but the list always shows me the last record from the database as the first item in the list (ASC or DESC).
    I want to put a dummy label as the first item in the list like: Select from list
    How can i do this, because even if i put a static value in the value list items, it still shows the last item from the recordset first instead of the static value.
    Does anybody have an idea how i can create a dynamic pulldown list in my form with the first item listed to be a statich dummy tekst or label like "Select from list etc"
    Thanks,

    I created a normal recordset with Dreamweaver getting tea
    m_id and team_names out of the database. Then i list the teamnames in a form list/
    menu (dropdown) to show all the available teams. Again it shows me the last record from the
    recordset as the first list item and i want a standard "select this" text or something default.
    The form code below is generated by dreamweaver itself. I already tried to also put one static value in the value list property but i get the same result. To me it looks like the while loop is overriding whatever you put as static text.
    <form id="form1" name="form1" method="post" action="">
      <label for="list_teams">Teams:</label>
      <select name="list_teams" id="list_teams">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_Teams['team_id']?>"<?php if (!(strcmp($row_Teams['team_id'], $row_Teams['team_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Teams['team_name']?></option>
        <?php
    } while ($row_Teams = mysql_fetch_assoc($Teams));
      $rows = mysql_num_rows($Teams);
      if($rows > 0) {
          mysql_data_seek($Teams, 0);
       $row_Teams = mysql_fetch_assoc($Teams);
    ?>
      </select>
    </form>

Maybe you are looking for