• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Help with IF function

Scheduled Pinned Locked Moved Dynamic Components
sketchup
6 Posts 3 Posters 1.7k 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.
  • T Offline
    twdant
    last edited by 29 May 2014, 13:44

    I understand how to use the IF function, but I'm having trouble figuring out how to produce the required TRUE value for the first IF argument.

    I need a formula that will return a TRUE value if the COPY attribute of a repeating subcomponent is equal to a certain number. Is there a function that will give me a TRUE value if two attributes are equivalent?

    1 Reply Last reply Reply Quote 0
    • J Offline
      Jim
      last edited by 29 May 2014, 21:35

      So for an attribute named "Value"

      Value: =IF(COPY = 2, TRUE, FALSE)

      will return TRUE if COPY i equal to 2 and FALSE otherwise. Have I misunderstood the question?

      Hi

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by 29 May 2014, 22:14

        There is no == double-equal comparison operator in Dynamic Components. It is just =

        Attention Required! | Cloudflare

        favicon

        (help.sketchup.com)

        (There should be < and <= on the linked page.)

        Hi

        1 Reply Last reply Reply Quote 0
        • P Offline
          pgarmyn
          last edited by 5 Jun 2014, 05:54

          @jim said:

          There is no == double-equal comparison operator in Dynamic Components. It is just =

          Attention Required! | Cloudflare

          favicon

          (help.sketchup.com)

          (There should be < and <= on the linked page.)

          Answered too fast, without reading completely.... sorry..

          1 Reply Last reply Reply Quote 0
          • P Offline
            pgarmyn
            last edited by 5 Jun 2014, 06:01

            @jim said:

            So for an attribute named "Value"

            Value: =IF(COPY = 2, TRUE, FALSE)

            will return TRUE if COPY i equal to 2 and FALSE otherwise. Have I misunderstood the question?

            Wrong answer :

            %(#999999)[Maybee it should be (?):
            Value=IF(COPY == 2, TRUE, FALSE)
            But this will also work (shorter=better?) :
            Value=(COPY == 2)]

            Correction : this is for ruby, not for dynamic components

            1 Reply Last reply Reply Quote 0
            • P Offline
              pgarmyn
              last edited by 5 Jun 2014, 06:04

              Wrong answer :
              value1==value2 will return TRUE or FALSE

              Correction : this was for ruby, not for dynamic components

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                5/6
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement