• Fabrik4.5.3 for J!5.3.0 and J!4.2+is out

    You must update from Fabrik4.5.1 if you are running Joomla!5.3.0

    See Announcements

FixSometime Bug? export csv

asespedal

New Member
I have a table where the "abbreviated" field (calc) represents the first and last name of the "name" field. If you export by fields and the "name" field is not selected, the "abbreviated" field will look like this: "{aaa_aainscritos___nome} {aaa_aainscritos___nome}".
calculation formula:
$name = '{aaa_aainscritos___nome}';
$name = explode(' ', $name);
$firstName = $name[0];
$lastName = (isset($name[count($name)-1])) ? $name[count($name)-1] : ' ';
return $firstName." ".$lastName;
 

Attachments

Try with setting the element to "Always render" in "List view settings"
or to access via $data['aaa_aainscritos___nome']

BTW: Screenshots are more convenient than files which must be downloaded/opened.
 
Try with setting the element to "Always render" in "List view settings"
or to access via $data['aaa_aainscritos___nome']

BTW: Screenshots are more convenient than files which must be downloaded/opened.
I made the changes indicated and it exports correctly with "abbreviated" and "name". If you exclude "name" the "abbreviated" field is left blank.
 

Attachments

  • lista.jpg
    lista.jpg
    38.2 KB · Views: 135
  • abreviado.jpg
    abreviado.jpg
    67.2 KB · Views: 126
  • list view.jpg
    list view.jpg
    57.9 KB · Views: 125
Yes. Obvioulsy in CSVexport calc (with "Only calc on save"=no) is working only if the used elements are also exported.

If in your case the calc is only used in list view you could set it to "Only calc on save"=yes.
Then it won't calc "on the fly" for the list view but take the values stored in the database.
 

Members online

No members online now.
Back
Top