auto copy content of llokup field in another field

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
fgazza
Veteran Member
Posts: 205
Joined: 2019-04-30 17:37

auto copy content of llokup field in another field

Post by fgazza » 2019-10-05 14:16

Hello to all.
I have an "appointments" table with a "intest_attestato_graph" field which is a lookup field that points to an image type field in another table.
When working with the records in the "appointments" table, I would like the image of the chosen image to be copied to another "url_intest_att_graph" field by choosing the image through the lookup field "intest_attestato_graph".

I tried with this code inserted in the file that I created "appointments-dv.js" but it doesn't work (the "url_intest_att_graph" field remains empty in the database).

function updateUrl() {
var intest_attestato_graph = $j( '#intest_attestato_graph' ).val(),
$j( '#url_intest_att_graph' ).text(intest_attestato_graph);
$j( '#url_intest_att_graph' ).val(intest_attestato_graph);

}

$j('#url_intest_att_graph').on('change', function() {
updateUrl();
});

Can someone kindly help me?

Thanks!

Fabiano

Post Reply