This topic is locked

Sql variable :master.field

10/27/2020 7:12:47 PM
PHPRunner General questions
Max author

Hello

in a lookup field I have a WHERE condition used to filter records.
In ADD mode all works fine, but if ADD page is shown after clicking on record copy icon it seems to be not honored.
I mean, this works in simply ADD page:

user_mfrontend_id = :master.user_mfrontend_id AND ...

but it doesn't work in ADD page after run copy record.
I have not done any changes to the code project, I've simply upgrade to last PHPR version.
Please, anyone know how to solve this issue or direct me to a valid workaround?
Many thanks in advance.
Max

Sergey Kornilov admin 10/28/2020

This specific scenario "copy a details record where SQL variable references master table record" maybe not be fully supported. Here is what you can try though.
Add the following code to Add page: Javascript OnLoad event, it may help.

var ctrl = Runner.getControl(pageid, 'user_mfrontend_id');

ctrl.fireEvent('change');
Max author 10/28/2020



Add the following code to Add page: Javascript OnLoad event, it may help.

var ctrl = Runner.getControl(pageid, 'user_mfrontend_id');

ctrl.fireEvent('change');



Ok, thank you.