art3mis Posted September 29, 2021 Share Posted September 29, 2021 Have a expression problem but not sure if I can keep the logic in a single expression. Right now I am using the following expression which works fine Lets call this expression 'A' fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75) However what I need to happen is when a different expression (lets call it 'B') results in an even number I need to either add or subtract .5 from expression A This is expression 'B'. Paremeter name insetDepth which is same name as the parent HDA integer parameter being referenced. ch("../insetDepth")*.5 Quote Link to comment Share on other sites More sharing options...
kstrev Posted September 30, 2021 Share Posted September 30, 2021 Hey Artemis the expression should be something along those lines if I understand correctly what you are trying to achieve: if(ch("../insetDepth")*0.5%2==0,fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75)+0.5,fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75)) the only part I am not sure about is what drives the addition or subtraction of 0.5. Should there be another if statement there? If you need to add even more code in the expression I would definitely try to do it in a wrangle cause it starts to get massive already Hope that helps! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.