• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

concatenate 3 values of different fields and display them in a different field

rickj72

New Member
hi, I have three fields in my list and I would like to display them in a different field together in the same list, I have tried with both element calc and databasejon, using the wiki examples, with calc elements when I insert return '{table_name___element1}'. '{table_name ___ element2}' return '{table_name___element1}'. '{table_name___element3}'; i have error 500, instead with databasejon element, i get as result a simple text string with the values i wrote as suggested in the tips, i tried to modify anything, i read wikis and i couldn't solve, fabrik versions joomla 3.7 and 3.7.5 with php 5.6, can anyone suggest me how to fix it?
 
In calc element you can have only one return.
In your example code i think you have error because you have syntax error - before second return you need to have ';'.
But you can have concantenate only element1 and element2.
Need to rearange your code.
For databasejoin element you need to show your code to resolve it.
 
Last edited:
return '{table_name___element1}'. '{table_name ___ element2}' .'{table_name___element1}'. '{table_name___element3}';

i'm sorry, this is my correct code, and i have error
 
fabrik versions joomla 3.7 and 3.7.5 with php 5.6
This is totally outdated (but should not matter in this case).
What is your real code and where did you put it (screenshot)?
 
in allegato ...
 

Attachments

  • Schermata del 2021-05-04 12:00:35.png
    Schermata del 2021-05-04 12:00:35.png
    41.3 KB · Views: 89
  • Schermata del 2021-05-04 11:57:38.png
    Schermata del 2021-05-04 11:57:38.png
    256.5 KB · Views: 65
It's looking ok.
What happens if you are using a hardcoded value?
return '123';
 
The same error 500 when I see the details of the card,
The filters always work and give me a list of cards, but when I enter the card I have this error
 
Ok, then the problem is not the calc element/calc code.

No idea what's going on on your site.
Try to disable the calc element, other elements, maybe plugins you are running etc.

And as I said: your versions are outdated, with security issues...
 
I think I understand that for some reason the element calc does not work and gives me an error, if I deactivate calc element everything works normally, I would like to have only the merge of these three fields, if I could also with databasejon, with this element I have no errors , but it doesn't read me the values, can you help me figure out if it's my code error?
 

Attachments

  • Schermata del 2021-05-04 15:13:04.png
    Schermata del 2021-05-04 15:13:04.png
    175.7 KB · Views: 51
  • Schermata del 2021-05-04 15:12:43.png
    Schermata del 2021-05-04 15:12:43.png
    230 KB · Views: 48
now I have no errors but only a string with empty values, I cannot understand if it is a syntax problem
 

Attachments

  • Schermata del 2021-05-04 16:03:08.png
    Schermata del 2021-05-04 16:03:08.png
    212.6 KB · Views: 60
  • Schermata del 2021-05-04 16:12:52.png
    Schermata del 2021-05-04 16:12:52.png
    175.3 KB · Views: 55
Did you use the correct column names?
Did you save the record with something selected in your dbjoin?
 
maybe I explained myself badly for my final result, when I write the concatenation of these three fields I would already expect the 3 values of the same record in this field as a result, but the databasejon if I do not insert anything and / or save it returns me default only the two separator commas, if instead I go to fill in the field it gives me a long series of concatenated values relating to all the records but I have to select it and insert it record by record about 1000 records, I would like the three concatenated values in the presence of the values of the other 3 fields were already in the new field I created with databasejon .... I don't know if it's clear
 
You can set "Only calc on save" to "No", so you will have the value showing up in list, but it's not recorded on database and therefore this field is not searchable and orderable. If you want it to be written in database, set "Only calc on save" to "Yes" and update the calc field in PhpMyAdmin with a update query. As I understood, you didn't want to edit and save around 1000 records manually :)
 
hi, that would be perfectly what I want, but the calc element gives me an error when I pass the parameters, can you read previous messages, could you help me to identify what caused the error?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top