Home » Developer & Programmer » Forms » Tabular Block's Checkbox Issue (Oracle Forms 11g, Windows 10)
Tabular Block's Checkbox Issue [message #678259] Thu, 21 November 2019 00:20 Go to next message
ANASKABIR
Messages: 15
Registered: November 2019
Junior Member
i have a tabular block's checkbox.. i want to check one checkbox at a time .. if i check another checkbox previous checkbox will uncheck automatically. can i do that ??
Re: Tabular Block's Checkbox Issue [message #678326 is a reply to message #678259] Sun, 24 November 2019 15:36 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You'd use WHEN-CHECKBOX-CHANGED trigger.

  • save current row number (hint: :system.trigger_record)
  • loop through all rows in the block
  • set all checkboxes to "not checked" except the one that belongs to the row you previously saved
Re: Tabular Block's Checkbox Issue [message #678333 is a reply to message #678326] Mon, 25 November 2019 03:20 Go to previous message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
  IF :global.row_set IS NULL THEN
    :global.row_set := :system.trigger_record;
    LOOP
      first_record;
      IF :system.current_record != :global.row_set THEN
        uncheck checkbox;
      END IF;
      EXIT WHEN :system.last_record = TRUE;
      next_record;
    END LOOP;
    go_record(:global.row_set);
    :global.row_set := NULL;
  END IF;  
You need the IF to avoid an infinite loop, since changing a check-box in when-checkbox-changed will fire when-checkbox-changed.

[Updated on: Mon, 25 November 2019 03:20]

Report message to a moderator

Previous Topic: Move Item on a Canvas
Next Topic: Error ora-012546 TNS: Permission denied
Goto Forum:
  


Current Time: Thu Mar 28 08:06:49 CDT 2024