Like aka I have a similar problem with a detail form which is integrated in a master.
I have a table with columns id_a and id_b which I check with a sql query if a record exists
(in OnLoad of master form)
$query = "SELECT id_a, id_b FROM project WHERE id_a = [v_a] AND id_b = [v_b]";
sc_select(dataset, $query);
if there is already a record with this criteria in the table I want my detail form my_detail_form shown only with a cancel button (not allowed to insert a new record)
if there isn’t a record in the table I would like to go directly in insert mode to make a new record.
if (false == {dataset})
{
// Record not found
sc_apl_conf ("my_detail_form", "start", "new");
}
else
{
// Record found
sc_apl_conf ("my_detail_form", "insert", "off");
}
Summary is that the my_detail_form doesn’t go to the insert mode it only shows “no records found”.
What’s wrong?