## Help with IF function

### Help with IF function

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?
0

twdant

### Re: Help with IF function

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

Correction : this was for ruby, not for dynamic components
0
Last edited by pgarmyn on Thu Jun 05, 2014 7:04 am, edited 8 times in total.

pgarmyn
PluginStore Author

### Re: Help with IF function

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?
0
Hi

Jim
Global Moderator

### Re: Help with IF function

Jim wrote: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 :

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
0
Last edited by pgarmyn on Thu Jun 05, 2014 7:01 am, edited 6 times in total.

pgarmyn
PluginStore Author

### Re: Help with IF function

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

http://help.sketchup.com/en/article/114563

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

Jim
Global Moderator

### Re: Help with IF function

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

http://help.sketchup.com/en/article/114563

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

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

pgarmyn
PluginStore Author

### SketchUcation One-Liner Adverts

Ad Machine
Robot

Return to Dynamic Components

## Who is online

Users browsing this forum: No registered users and 2 guests