Page 1 of 1

String concat in Blocky

Posted: Thursday 14 September 2017 12:46
by Ouate
Hi,
I would like to concat 2 strings with blocky (to send using notification).
I would like to send to the notifcation something like that : "notification at " + time
I can not use operator "logic" "AND" to use with 2 texts ""

Is is possible to use concatenation in blocky ?

"te" + "xt" = "text"

Thanks.

Re: String concat in Blocky

Posted: Thursday 14 September 2017 14:15
by SweetPants
Ouate wrote: Thursday 14 September 2017 12:46Is is possible to use concatenation in blocky ?
No, switch to LUA or dzVentz, gives you much more flexibility

Re: String concat in Blocky

Posted: Thursday 14 September 2017 14:18
by Ouate
I can't believe that this basic and essential function (concat 2 simple texts) is not possible in blocky in Domoticz !
IT's possible in blocky but not in Domoticz's blocky.
What a pity.

Re: String concat in Blocky

Posted: Thursday 14 September 2017 18:49
by SweetPants
Well, it's an Open Source project. if you want it in, you can try adding it in yourself

Re: String concat in Blocky

Posted: Friday 15 September 2017 12:01
by Ouate
Unfortunately, I'm not able to do that.

I don't know why the "create text with" function of Blocky is not present in Domoticz.

Re: String concat in Blocky

Posted: Friday 15 September 2017 16:08
by SweetPants
Ouate wrote: Friday 15 September 2017 12:01 I don't know why the "create text with" function of Blocky is not present in Domoticz.
Life is full of choices, you can always request for this to be implemented, but many developers do this in their spare time, so don't expect a quick implementation of this feature

Re: String concat in Blocky

Posted: Monday 02 October 2017 22:17
by domonator
Ouate, have you tried an expression with {{ and }} ?
It's described here: https://www.domoticz.com/wiki/Events#Th ... _interface

Unfortunately, time is not an expression listed there, but you could first set time as a user variable and then refer to it as {{variable[1234]}} where 1234 is the Idx of this user variable. I haven't tried it myself, but thought it was worth a shot.

Re: String concat in Blocky

Posted: Monday 02 October 2017 22:35
by Ouate
domonator wrote: Monday 02 October 2017 22:17 Ouate, have you tried an expression with {{ and }} ?
It's described here: https://www.domoticz.com/wiki/Events#Th ... _interface

Unfortunately, time is not an expression listed there, but you could first set time as a user variable and then refer to it as {{variable[1234]}} where 1234 is the Idx of this user variable. I haven't tried it myself, but thought it was worth a shot.
Thank you domonator.
It's a very interesting thing.
I didn't know that.
I will test it soon.
Thanks again for your help. :)

Re: String concat in Blocky

Posted: Sunday 15 October 2017 15:04
by psb777
Ouate wrote: Thursday 14 September 2017 14:18 I can't believe that this basic and essential function (concat 2 simple texts) is not possible in blocky in Domoticz !
IT's possible in blocky but not in Domoticz's blocky.
What a pity.
I regret the near hostile responses you have got from others from what I see as reasonable comment, I would agree with you: It is a real pity that more of the standard Blockly functionality is not available in Domoticz.

Generally there are many ways that one can contribute to open source. One can not only write it, but one can document it, one can test it, and one can report bugs. Most often I find I report bugs into a hostile environment where a bug report is seen as personal criticism. Not all of us can program and very few of us can program very well. But the "if you don't like it fix it" response you have received here is not constructive. A feature request is *also* one way to contribute to open source.

Re: String concat in Blocky

Posted: Monday 16 October 2017 11:18
by Ouate
psb777 wrote: Sunday 15 October 2017 15:04
Ouate wrote: Thursday 14 September 2017 14:18 I can't believe that this basic and essential function (concat 2 simple texts) is not possible in blocky in Domoticz !
IT's possible in blocky but not in Domoticz's blocky.
What a pity.
I regret the near hostile responses you have got from others from what I see as reasonable comment, I would agree with you: It is a real pity that more of the standard Blockly functionality is not available in Domoticz.

Generally there are many ways that one can contribute to open source. One can not only write it, but one can document it, one can test it, and one can report bugs. Most often I find I report bugs into a hostile environment where a bug report is seen as personal criticism. Not all of us can program and very few of us can program very well. But the "if you don't like it fix it" response you have received here is not constructive. A feature request is *also* one way to contribute to open source.
Thank you.
I appreciate your comment.
That's exactly the feeling I had when I read the answer....

Re: String concat in Blocky

Posted: Monday 16 October 2017 22:01
by Shaggie_NB
Ouate wrote: Monday 16 October 2017 11:18
psb777 wrote: Sunday 15 October 2017 15:04
Ouate wrote: Thursday 14 September 2017 14:18 I can't believe that this basic and essential function (concat 2 simple texts) is not possible in blocky in Domoticz !
IT's possible in blocky but not in Domoticz's blocky.
What a pity.
Thank you.
I appreciate your comment.
That's exactly the feeling I had when I read the answer....
But did you test it, like you said you would? Feedback please..