show link in record in datagrid template

AfADaDa1

New member
Hi,

I have a table access and a table films. The ID_films from the table access is linked with the lookup field to the title of the film in the films table. Now I am creating a datagrid template for the result page of the table access.

dadabik_field ID_films dadabik_field<br/>

My problem is that I need to show the title in the <a> but I need the ID_films for the href. Is there a way to get once the title and once the ID_films ? I have seen that there is a function "Show link to record?" in the admin menu and that's exactly what i want to do in my template

Thanks for the answer

Florian
 

AfADaDa1

New member
DaDaBIK version 9.3-Monterosso enterprise

PHP Version: 7.1.30

mysql version: 5.5.5-10.1.40-MariaDB

Web server: Apache

Client: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
 

eugenio

Administrator
Staff member
Hello,
the "Show link to record?" only works for the standard datagrid, not for templates.

If ID_films is a lookup field, you will always see the linked field (film name in your case), you can't show the ID.

However, you could create a VIEW where you repeat the id_film twice, the second time having an alias (e.g. id_film AS id_film_2) and then set in form configurator this second field differently (no lookup).

Best,
 
Top