🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Multiple AND/OR cases within an if statement

    Scheduled Pinned Locked Moved UIFlow
    7 Posts 2 Posters 11.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mathiasM Offline
      mathias
      last edited by

      Hi there,

      How can add multiple AND/OR cases within an if statement? See image. I only can add one AND within an if statement but I want to have more. 0_1608546156682_Bildschirmfoto 2020-12-21 um 08.59.29.png

      Any hints?

      Thanks,
      Mathias

      1 Reply Last reply Reply Quote 0
      • D Offline
        Dario
        last edited by Dario

        I don't exactly know what you would like to do, but you can do something like this:

        0_1608561309057_26b23538-3e72-4e79-8f44-ffa389bc809f-image.png

        or like this:

        0_1608561336184_6e2086e1-ad1c-4ae0-85be-a58be76daa68-image.png

        mathiasM 1 Reply Last reply Reply Quote 0
        • mathiasM Offline
          mathias @Dario
          last edited by

          @dario Thanks for your reply. It's close to what I'm looking for. But I want to add another AND case within the if statement on the level where the arrows are.

          0_1608584272024_Bildschirmfoto 2020-12-21 um 21.55.12.png

          D 1 Reply Last reply Reply Quote 0
          • D Offline
            Dario @mathias
            last edited by Dario

            @mathias can you please write the logic expression that you want to code in UIFlow?

            Example:
            (var1 > 50 and var1 < 70) and (var2 > 10 and var2 < 20) and (var3 > 30 or var4 > 50)

            mathiasM 1 Reply Last reply Reply Quote 0
            • mathiasM Offline
              mathias @Dario
              last edited by

              @dario exactly the way you show in your example above.

              1 Reply Last reply Reply Quote 0
              • D Offline
                Dario
                last edited by

                The following example is this expression:
                (var1 > 50 and var1 < 70) and (var2 > 10 and var2 < 20) and (var3 > 30 or var4 > 50)

                Step 1

                0_1608793993460_7dd9e324-92c4-4167-be44-f0dd11539616-image.png

                Step 2

                0_1608794028390_92d2b768-412e-41b2-a7e6-608459678563-image.png

                Step3

                0_1608794046841_a7a577ad-7a61-445f-8815-7bfd2f3d86ce-image.png

                Step 4

                0_1608794071374_723ac24a-30ed-4191-95a8-d5c1a59248b5-image.png

                mathiasM 1 Reply Last reply Reply Quote 0
                • mathiasM Offline
                  mathias @Dario
                  last edited by

                  @dario Thanks!

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post