Home » Developer & Programmer » Forms » Radio group initial value (Forms 10)
Radio group initial value [message #360364] Thu, 20 November 2008 12:02 Go to next message
yuriy_l
Messages: 6
Registered: September 2008
Junior Member
Hi All,

I have a form used for inserting some data into database. I have following problem: in 'Enter-Query' mode I have a LOV-based text item, in which I select some value and execute query.

Depending on the selected value, one of two radio buttons of a radio group (related to a database table column) should be selected by default: sometimes the first one, sometimes - the second.

The problem is that I can't set "Initial_value" property at a runtime, thus currently always the first radio button is selected by default.
If I explicitly select the second one after query execution - then :System.Form_Status value changes to 'CHANGED'.

Is there a way to make the described case work without affecting :System.Form_Status variable?

Thanks.
Re: Radio group initial value [message #360382 is a reply to message #360364] Thu, 20 November 2008 14:57 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
If I explicitly select the second one after query execution - then :System.Form_Status value changes to 'CHANGED'.

Did you consider explicitly setting record status after this change has been done; something like
set_record_property(:system.trigger_record, 'block_name', status, query_status);
Re: Radio group initial value [message #360493 is a reply to message #360382] Fri, 21 November 2008 03:02 Go to previous message
yuriy_l
Messages: 6
Registered: September 2008
Junior Member
That is definitely the solution. Thanks.

Just a small change that I've done in your code:
set_record_property(:system.trigger_record, 'block_name', status, new_status);
Previous Topic: inserting summary data into bal table from detail-table after commit
Next Topic: How to run Form in internet explorer?
Goto Forum:
  


Current Time: Mon Feb 03 15:00:13 CST 2025