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

hide-when formula error on more than 1 operators #505

Open
beblank opened this issue Dec 3, 2013 · 3 comments
Open

hide-when formula error on more than 1 operators #505

beblank opened this issue Dec 3, 2013 · 3 comments

Comments

@beblank
Copy link

beblank commented Dec 3, 2013

Any leads on formula with multiple operators?

plominoDocument.getItem('Form1') != 'Yes' and plominoDocument.getItem('Form2') != 'No' and plominoDocument.getItem('Form5')  != 'idk' and plominoDocument.getItem('Form4') != 'Yes'

tried separating with 1 operators

a = plominoDocument.getItem('Form1') != 'Yes' and plominoDocument.getItem('Form2') != 'No' 
b = plominoDocument.getItem('Form5') != 'idk' and plominoDocument.getItem('Form4') != 'Yes'
a and b

but it return True while supposed to return False

thanks

@ebrehault
Copy link
Member

if your formula is longer than one line then you must use the 'return' keyword to actually return someting (with one-liner, return is implicit) so:

a = plominoDocument.getItem('Form1') != 'Yes' and plominoDocument.getItem('Form2') != 'No' 
b = plominoDocument.getItem('Form5') != 'idk' and plominoDocument.getItem('Form4') != 'Yes'
return a and b

@beblank
Copy link
Author

beblank commented Dec 4, 2013

return value same with the option 2 (the separated operators)
still show wrong boolean

@ebrehault
Copy link
Member

use Log() to log values and find out what is going on

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

No branches or pull requests

2 participants