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
8 replies
Subscribers
6 subscribers
Views
2556 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Lately I have observed some weird behavior in one of my grid used in a tempo act
saileshd
over 9 years ago
Lately I have observed some weird behavior in one of my grid used in a tempo action. I have added a small logic to make enable the submit button only if at least one of the record in grid is checked and the text box is entered. But even if the check boxes are selected and text-box is filled with valid inputs the submit button is still inactive. Moreover this behavior is not consistent. I have even confirmed that when we try to select the same record/s and enter same value in the text box as previous when it was not working, at some other time, then the system allows to do it. I am not able to find the reason for this kind of behavior. Posting the code for the same below for reference. Are there any suggestions for this?
ICAMS_SLOT_INTERFACE.txt
OriginalPostID-198466
OriginalPostID-198466
Discussion posts and replies are publicly visible
0
Tom Ryan
Appian Employee
over 9 years ago
You should be able to take advantage of the in-built validation functionality to achieve this:
forum.appian.com/.../SAIL_Design.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
saileshd
over 9 years ago
The error persists even if i comment the code for disabling the submit button for said conditions
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 9 years ago
What error are you seeing? Can you isolate the section of the expression that is throwing it?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
It's quite difficult to tell as I can't run your code or see the subrules, but it may be this line from the submit button:
disabled: or(if(count(local!selectedModules)=0, true, false), isnull(ri!fid)),
First off, if(count(local!selectedModules)=0, true, false) is redundant as count(local!selectedModules)=0 will always return a true/false result. That aside, count() can sometimes return 1 when you don't expect it - for example, count(null) returns 1.
Have you tried using length or a combination of APN_isEmpty and length?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
If it's not the above, then try adding two textboxes with values of count(local!selectedModules)=0 and isnull(ri!fid) so that you can see what the value of each is - that way you'll be able to see which of those values is causing the button to remain disabled.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
saileshd
over 9 years ago
Thanks everyone, will test this and post my outcome soon
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sachinr528
over 9 years ago
Hi Sailesh, The problem with expression or(if(count(local!selectedModules)=0, true, false), isnull(ri!fid)) that you are using to disable the button. As per my experience count returns even if the passed value is null. So the expression should be like
or(isnull(local!selectedModules),count(local!selectedModules)>1, isnull(ri!fid))
This will enable button when exactly one record is selected.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
saileshd
over 9 years ago
Thanks Everyone for the explanation and guiding me towards right solution.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel