String concat in Blocky

Moderator: leecollings

Post Reply
Ouate
Posts: 36
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

String concat in Blocky

Post 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.
SweetPants

Re: String concat in Blocky

Post 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
Ouate
Posts: 36
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: String concat in Blocky

Post 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.
SweetPants

Re: String concat in Blocky

Post by SweetPants »

Well, it's an Open Source project. if you want it in, you can try adding it in yourself
Ouate
Posts: 36
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: String concat in Blocky

Post 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.
SweetPants

Re: String concat in Blocky

Post 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
domonator
Posts: 5
Joined: Thursday 12 January 2017 22:14
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: String concat in Blocky

Post 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.
Ouate
Posts: 36
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: String concat in Blocky

Post 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. :)
psb777
Posts: 3
Joined: Sunday 15 October 2017 14:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: String concat in Blocky

Post 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.
Ouate
Posts: 36
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: String concat in Blocky

Post 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....
User avatar
Shaggie_NB
Posts: 25
Joined: Thursday 30 January 2014 20:46
Target OS: Windows
Domoticz version:
Location: Oss
Contact:

Re: String concat in Blocky

Post 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..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest