Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Bug in Dialogflow JOIN function?

Hello,

I have a simple agent that uses the JOIN function from the Dialogflow CX system functions. I am wondering why something like this wouldn't work and if it is a bug in the JOIN function:

karlgardner_0-1706209211886.png

And now I test it in the simulator and the JOIN function does not get resolved with the currrent list that is there:

karlgardner_1-1706209289610.png

Seems like a bug in the JOIN function to me because the TO_TEXT function should be called on the elements in the list if they are not strings: 

 

1 2 168
2 REPLIES 2

I am not sure what is the parameter of your functions is but looking at the documentations $session.params are enclosed with quotation marks:

 

nceniza_0-1706816054827.png

Can you try enclosing yours with quotation marks? 

Hello @nceniza Thanks for the response! So I tested that and it works:

karlgardner_0-1706886423565.png

karlgardner_1-1706886446606.png

However, what I am confused about is before it was resolving the following text:
$sys.func.JOIN(", ", [234 OtherText, OtherText])

If it resolves this text the following documentation statement in the JOIN function states: "If the elements in the list are not strings, the result of the function is equivalent to applying the TO_TEXT function to each element before joining."

So shouldn't it be producing a string anyways with the TO_TEXT function?