Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OR block #34

Open
bartbutenaers opened this issue Sep 12, 2018 · 8 comments
Open

Add OR block #34

bartbutenaers opened this issue Sep 12, 2018 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@bartbutenaers
Copy link
Owner

See feature request on the Node-RED forum from @mikeS7:

Has property in a get block is the nice feature. Could you please add default value to the get method to support javascript style such as msg.property || or for a context context.get('property') ||

But we need to take into account the feedback from Dave:

don't forget that that syntax doesn't always work as 0, "0", false, etc are all "falsey" in javascript, so while it's a neat shorthand in many cases... it's not 100%. I'd argue it's safer to leave out of the blocks for now.

We will postpone this feature to version 1.2.0

@bartbutenaers bartbutenaers self-assigned this Sep 12, 2018
@bartbutenaers bartbutenaers added the enhancement New feature or request label Sep 12, 2018
@bartbutenaers
Copy link
Owner Author

The AND/OR block is already available in the "Logic" category:

blockly_or

@bartbutenaers
Copy link
Owner Author

@mikeS7,
I will reopen this issue, based on the comments on Discourse.

@bartbutenaers bartbutenaers reopened this Aug 18, 2021
@bartbutenaers
Copy link
Owner Author

When we don't find/want an easy solution, at least the workaround and workspace from @cymplecy should be added to a wiki page.

@mikeS7
Copy link

mikeS7 commented Aug 18, 2021

I agree with Simon, this is specific to Javascript. Solution with Javascript block is elegant and simple.
image

@bartbutenaers
Copy link
Owner Author

@cymplecy,
Can you then please create a wiki page with both your flows from Discourse please?
Thanks!

@cymplecy
Copy link
Collaborator

Certainly :)

@cymplecy
Copy link
Collaborator

Basic page done - will probably amend it later but at least it's there :)

https://github.com/bartbutenaers/node-red-contrib-blockly/wiki/Advanced-usage

@bartbutenaers
Copy link
Owner Author

Ok thanks!!
Perhaps you can add your flow json definitions also, so people can import them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants