Results 1 to 7 of 7

Thread: radio button

  1. #1
    Join Date
    Jul 2004
    Posts
    4

    Thumbs down Unanswered: radio button

    hi all,

    i'm new to oracle form 6i...

    how to use radio button in form6i... what are the syntax i need??

    thank you for ur help

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You need to create a new Item of Item Type "Radio Group". Then create a Radio Button for each permitted value under that group.

  3. #3
    Join Date
    Jul 2004
    Posts
    4
    Hi...

    Then how about inserting them into database.. Is it like normal??

    e.g.
    insert into tables values (:table.item);

    It's because i get "FRM-40509:Oracle error: Unable to UPDATE record" error message when i try to click on the button to save the new record

    Thank you for your help

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    When you have a radio button, you assign a value on the radio button (not radio group) that will be used. However, you use the radio group in your insert statement. See pseudo code below.

    My_Radio_group
    red = 'R'
    blue = 'B'
    yellow = 'Y'


    Insert into my_colors
    values(my_radio_group);

    If the radio button yellow had been selected, My_Radio_Group would be equal to the value "Y"
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Jul 2004
    Posts
    4
    i guess i've already gotten an idea from the example you give. Thank you...

    But i still have some questions. I don't know if i can post it here...

    I create buttons called 'Create New Record' and "Save Record".

    I think I have to clear the form before click on "Create New Record" button... Am I correct??? Please correct me if I am wrong...

    Thanks for your guidance

  6. #6
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    for an example, say you have a block called my_block and you want to create a new record in the block using a button. You would have the following code in your button.

    go_block('my_block');
    create_record;


    If you wanted to commit and clear the block use.

    go_block('my_block');
    clear_block('commit');

    If you wanted to commit the entire form then
    commit;

    Remember, a block based on a table will directly update,delete, and insert on the base table. If your block is based on a complex view, you would want to set up on-insert, on-delete, and on-update triggers on the block to handle the base tables making up the view.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  7. #7
    Join Date
    Jul 2004
    Posts
    4
    Thank you very much...

    Finally i can get it work...

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •