Page 1 of 1

How to get value from another table

Posted: Fri Oct 07, 2016 2:16 pm
by dire

Table A has value form Table B (tableB.id) and I need value from Table B( tableB.code).
I want to use custom function with ew_ExecuteScalar (Select TableB.code FROM TableB WHERE ??) in global code and then call this function from custom attributes field.

Please for some good example, because I’m starting to learn.

thx :)


Re: How to get value from another table

Posted: Thu Oct 13, 2016 12:24 pm
by motfs

You can put JavaScript function in Custom Attribute only. But your code is server side. Elaborate in detail what you try to do.


Re: How to get value from another table

Posted: Thu Oct 13, 2016 1:35 pm
by dire

I have Table Customer with fields (name, surname, address, post, state, etc). Fields post, state are FK from table sif_post and sif_state.
I would like to have link on field address (for googl emaps).
I manage Prefix (url for googl emaps), HREF value is address, I need post_code from sif_post and state_code from sif_state


Re: How to get value from another table

Posted: Sat Oct 15, 2016 1:25 pm
by motfs

You can create Custom Field to get the value (test your SQL expression first) and use these fields to create full address. Read Custom Fields in help file for more details.


Re: How to get value from another table

Posted: Sat Oct 15, 2016 1:29 pm
by dire

thx