This topic is locked
[SOLVED]

 [PHPRunner 5.3] edit a record with dropdown box

9/22/2011 6:09:28 AM
PHPRunner General questions
F
Francesco_5000 author

hello,
I have a problem to update the records in a table with a secondary key, in essence, I associate the mall to its director. So I created a dropdown box which, by specifying the name of the director the other fields are updated automatically. I.e. I am using the autofill.
Well, with the add to the page I have no problem, but the same procedure does not work in the edit page and in the inline edit page.
these are the "JavaScript onload" events:
var ctrl = Runner.getControl (pageid, 'telefono_direttore');

ctrl.setDisabled ();
var = ctrl1 Runner.getControl (pageid, 'fax_direttore');

ctrl1.setDisabled ();
var = CTRL2 Runner.getControl (pageid, 'cellulare_direttore');

ctrl2.setDisabled ();
var = ctrl3 Runner.getControl (pageid, 'email_direttore');

ctrl3.setDisabled ();
these are the "records before update" events:
unset ($ values ​​["id_direttore"]);

unset ($ values ​​["nominativo_direttore"]);

unset ($ values ​​["telefono_direttore"]);

unset ($ values ​​["fax_direttore"]);

unset ($ values ​​["cellulare_direttore"]);

unset ($ values ​​["email_direttore"]);
unset ($ values ​​['zone_id']);

unset ($ values ​​["area_geografica"]);

unset ($ values ​​['region']);

unset ($ values ​​["nome_provincia"]);

unset ($ values ​​["nome_citta"]);

unset ($ values ​​["city-state"]);

unset ($ values ​​["province-region"]);

unset ($ values ​​["region-geographic-area"]);
Here is a snapshot:


I'm doing wrong or is it a bug PHPRunner 5.3

F
Francesco_5000 author 9/22/2011

I solved my problem with the checkbox "Apply on the edit page as well", (it's present in the autofill options, to me it was very hard to notice).
But the foreign key it's still constant <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=60973&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' /> and i can't update the record successfully... any ideas?
[edit]the foreign key was a read only field... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=60973&image=2&table=forumreplies' class='bbc_emoticon' alt=':)' /> now it's all ok, no more drawbacks. Would you please explain better these passages? Sometimes the procedures are not so intuitive and to me this is very unconfortable.[/edit]

Sergey Kornilov admin 9/22/2011

Not sure I understand what is the foreign key that is not updated here.
If you need more help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

F
Francesco_5000 author 9/22/2011



Not sure I understand what is the foreign key that is not updated here.
If you need more help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.


thanks admin, i've solved the problem on my own, the foreign key in table sito (i.e. mall) was id_direttore_sito (id_direttore was the primary key on direttore). The update failed because I had set the field of that key as readonly.