Buy Now
Sign in

concat problem

Fredolino , January 07 2020, 12:47
Fredolino 592
January 07 2020, 12:47 #390570
Hi,
I have a read_data function and in the fields to retrieve:
CONCAT(art , ', ' , gattung, ', ', autor)
This is ok with 3 table-fields.

But just i have a one more table-field:
CONCAT(art , ', ' , gattung, ', ', autor, ', ', artname_de)

One more table-field make a problem. But wat is the problem?
F.
healyhatman 8
January 07 2020, 13:18 #390572
Make sure you have the spaces around the commas.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 592
January 07 2020, 13:32 #390575
ok...
CONCAT(art , ' , ' , gattung , ' , ' , autor)  this give me correct
CONCAT(art , ' , ' , gattung , ' , ' , Autor, ' , ' , artname_de) this give me the error:
1583 Incorrect parameters in the call to native function 'concat'       
for ex. i have in CC6 this:
CONCAT(Artname.art , ', ' , Artname.gattung , ', ', Artname.autor , '  ', artname_de)
and i have not a problem...
healyhatman 8
January 07 2020, 14:06 #390577
Do the same thing then. Model.fieldname
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 592
January 07 2020, 16:01 #390579
I've already tested that. Unfortunately did not work in CF 6.
Fredolino 592
January 07 2020, 17:08 #390582
CONCAT(art , ' , ' , gattung , ' , ' , autor , '  ' , artname_de)
I have now tested the concetination with all field names in the table and the correct result was displayed.
The problem only occurs when I want to display data from the "artname_de" column.
There are also empty lines in the "artname_de" column. Concat probably cannot display this in CF6.
I tested the same table with Concat in the CC 6 and there are no problems.
healyhatman 8
January 07 2020, 22:41 #390585
Need the but at the end. Concat(....):model.alias with alias being what you want the new column to be called
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 592
January 09 2020, 08:46 #390610
I also tried the "alias" and there was no success.
I also tried square and round brackets.
Thats how it works:
CONCAT(art , ' ' , autor,', ' , gattung , ' ' , art)
CONCAT(art , ' ' , autor,', ' , gattung , ' ' , autor)
CONCAT(art , ' ' , autor,', ' , gattung , ' ' , gattung)
and this not:
read_data29:
order fields: art_nr = Ascending
retrieve:
art_id
CONCAT(art , ' ' , autor,', ' , gattung , ' ' , artname_de)
art_nr
Dropdown:
name: group[{var:area_repeater2.key}][art_id]
options:
= Art auswählen
{var:read_data29}
healyhatman 8
January 09 2020, 08:54 #390611
Screenshot your read data action
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 592
January 13 2020, 18:25 #390705
Hi,
So it works like in the screen (view and action).
I want to expand read_data29 with the data from the database "artnamen_de" and it just doesn't work.
I also tried the "alias" and there was no success.
I also tried square and round brackets.
Thats tests how it works:
CONCAT(art , ' ' , autor,', ' , gattung , ' ' , art)
CONCAT(art , ' ' , autor,', ' , gattung , ' ' , autor)
CONCAT(art , ' ' , autor,', ' , gattung , ' ' , gattung)

and this not:
read_data29:
order fields: art_nr = Ascending
retrieve:
art_id
CONCAT(art , ' ' , autor,', ' , gattung , ' ' , artname_de)
art_nr
view.jpg
action.jpg
databank.jpg
frontend.jpg
Attachments
view.jpg
view.jpg
(125.41 KiB)
113 Downloads/Views
action.jpg
action.jpg
(78.14 KiB)
105 Downloads/Views
databank.jpg
databank.jpg
(111.33 KiB)
113 Downloads/Views
frontend.jpg
frontend.jpg
(15.4 KiB)
107 Downloads/Views
healyhatman 8
January 13 2020, 23:02 #390708
You have it set to return an array of key/value pairs, but you're requesting 3 fields.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 592
January 13 2020, 23:51 #390709
i do not understand that.

Why does that work, for example:
CONCAT (art, '', autor, ',', gattung, '', gattung)

and that doesn't work
CONCAT (art, '', autor, ',', gattung, '', artname_de)
healyhatman 8
January 14 2020, 00:18 #390710
Just send me access details we're going around in circles. Include in your message exactly what fields you're trying to concatenate
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 592
January 16 2020, 17:21 #390742
I don't know why, but here's how it works:

art_id
CONCAT(artname_de , ' ' , gattung , ' ' , art , ' ' , Autor)
art_nr

Does a line break also work in CONCAT?
After "artname_de" I wanted to insert a line break for a better overview.
healyhatman 8
January 16 2020, 21:40 #390744
Try it and find out. '<br>'
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 592
January 16 2020, 23:06 #390748
CONCAT(artname_de , '<br> ' , gattung , ' ' , art , ' ' , Autor)
Work not. CF Editor delete this.
healyhatman 8
January 16 2020, 23:52 #390749
Try \n
But I don't know why it would remove it
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 592
January 17 2020, 10:40 #390755
That does not work either.
I don't think HTML is allowed in option tags, so it's filtered out.
It is only possible in combination with JS, since the text is then exchanged in the DIV.
(http://jsfiddle.net/t0xicCode/454Lqbz8/embedded/result,css,html,js)
But this is not possible with ChronoForms, since you only have value and text.
I don't know how ChronoForms builds the divs for the Select.
If it works with jQuery, all you have to do is enter the text with the breaks in the data content and you have multiple lines.
healyhatman 8
January 17 2020, 16:38 #390760
 Answer
Ohhh you wanted it in the dropdown? Yeah nope. You'd have to build it with PHP instead of using the field.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store