String concat in Blocky

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

String concat in Blocky

Post by Ouate » Thursday 14 September 2017 12:46

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
Posts: 1607
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8789
Location: The Netherlands
Contact:

Re: String concat in Blocky

Post by SweetPants » Thursday 14 September 2017 14:15

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

Ouate
Posts: 13
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: String concat in Blocky

Post by Ouate » 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.

SweetPants
Posts: 1607
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8789
Location: The Netherlands
Contact:

Re: String concat in Blocky

Post by SweetPants » Thursday 14 September 2017 18:49

Well, it's an Open Source project. if you want it in, you can try adding it in yourself

Ouate
Posts: 13
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: String concat in Blocky

Post by Ouate » Friday 15 September 2017 12:01

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
Posts: 1607
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8789
Location: The Netherlands
Contact:

Re: String concat in Blocky

Post by SweetPants » Friday 15 September 2017 16:08

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: 8
Joined: Thursday 12 January 2017 23:14
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: String concat in Blocky

Post by domonator » 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.

Ouate
Posts: 13
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: String concat in Blocky

Post by Ouate » Monday 02 October 2017 22:35

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: 5
Joined: Sunday 15 October 2017 14:51
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: String concat in Blocky

Post by psb777 » 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.

Ouate
Posts: 13
Joined: Thursday 03 August 2017 15:44
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: String concat in Blocky

Post by Ouate » 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.
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: 42
Joined: Thursday 30 January 2014 21:46
Target OS: Windows
Domoticz version:
Location: Oss
Contact:

Re: String concat in Blocky

Post by Shaggie_NB » Monday 16 October 2017 22:01

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 2 guests