Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Problem in implementing FAQ 81
Problem in implementing FAQ 81 [message #1933] Sat, 10 January 2009 17:50 Go to previous message
Jovan is currently offline  Jovan
Messages: 24
Registered: February 2008
Location: Serbia
Junior Member

Problem in implementing this:

81. How can I enter a value before calling a POPUP form?

I have a problem when I tried to enter textual value instead of foreign ID before calling
a POPUP form. tkm_ep_fizicko_lice is a PERSON PARENT table in my application.

010 // ************************************************************ *********************
020 function _cm_popupcall ($popupname, $where, $fieldarray, &$settings)
030 // perform custom processing after a call to ......
040 {
050 if ($popupname == 'tkm_ep_fizicko_lice(popup1)') {
060 // clear out contents of %where
070 $where = '';
080 // alow only one entry to be selected (the default)
090 $settings['select_one'] = true;
100
110 $where_uslov = '%'.$fieldarray['fiz_lice_id'].'%';
120 $where = "ime_prezime LIKE '{$where_uslov}'";
130 } // if
140 return $where;
150} // _cm_popupcall
160// ************************************************************ *********************

When I submit (add1) screen on CHILD table, where my popup form is, I had error text:
'Value is not whole number' Sys error (29), and I could not INSERT row in CHILD table

Than I change this end solved problem:

1. In function _cm_getForeignData ($rowdata)

I remember current ID from foreign PARENT table:
$rowdata['fiz_lice_id_before'] =
$foreign_data[0]['fiz_lice_id'];

2. In function _cm_pre_InsertRecord($rowdata) and
in function _cm_pre_updateRecord ($rowdata)

I put back contents of foreign ID field :
$rowdata['fiz_lice_id'] = $rowdata['fiz_lice_id_before'];

But...

I put inside of Popup screen of PARENT (PERSON) table two buttons in pre select area NEW and SEARCH. and one button in select area UPDATE. I have problem with SEARCH.

When I press SEARCH I found in field ime_prezime predefined text LIKE '%%', then I press
CLEAR and contents dismissed, but SEARCH criteria for this field does not work. Always
return ALL rows.

I tried everything to reset this field but I could not find solution. When I commented line 120 from previous source example this LIKE '%% string dismissed, but primary option of enter a value before calling a POPUP form don't work.

thanks


Jovan
 
Read Message
Read Message
Read Message
Previous Topic: login fails after upgrade to ver 1.42
Next Topic: Download of file where name contains spaces
Goto Forum:
  


Current Time: Sun Dec 29 12:03:29 EST 2024

Total time taken to generate the page: 0.00863 seconds