Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
7 subscribers
Views
1345 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I am working on a form in the editor. I want to show the "Submit" bu
rachealv537
over 10 years ago
I am working on a form in the editor. I want to show the "Submit" button if any of the conditions are true.
I have clicked the "only show this button when" and entered the following expression in the editor:
=or(pv!project.status<>"Cancelled",loggedinuser()=pv!project.initiatedBy,isusermemberofgroup(pv!initiator,28),isusermemberofgroup(pv!initiator,62))
Problem: It seems like it is only reading the first argument. I can see the button even if I am NOT a member of the groups listed. I can see the button if I am not the pv!project.initiatedBy loggedin user. The only time I cannot see the button is if a project is cancelled.
I tried each condition by itself and it worked how it was intended. Any suggestions?...
OriginalPostID-104570
OriginalPostID-104570
Discussion posts and replies are publicly visible
0
Aleksi White
Appian Employee
over 10 years ago
Racheal, is the submit button the only button you have on the form? If there is not a button for Appian to display on a form, then it will automatically create one called "Submit" to make sure you don't get stuck on the form.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rachealv537
over 10 years ago
@aleksi Hello! No, we have a "Go Back" button on there also. When I use each argument by itself they all work correctly. It is only when they are evaluated together that it is not working. It seems like it is only evaluating the first one.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
An OR statement evaluates to TRUE if at least one of the expressions is TRUE. If you want all conditions to be TRUE for the button to display, then you need an AND statement.
In your example, if the status is NOT cancelled, the rest of the conditions will not have effect on the result (they are still evaluated though) because the OR returns TRUE if at least one is TRUE.
When testing this expression review what the other expressions are returning, if at least one is TRUE the button will be displayed.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rachealv537
over 10 years ago
Thanks, Eduardo. That makes sense.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel