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
13 replies
Subscribers
9 subscribers
Views
5157 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Is it possible to segregate the difference between Check All and Normal select.
piyusha
over 10 years ago
Is it possible to segregate the difference between Check All and Normal select.
I am having two rows in the Grid. Now whenever I select 2nd row, automatically select all is also getting checked.
And my requirement is to differentiate these two event. I want to process further on the basis of this.
If Rows are selected by clicking on Select all then no need to process.
And if second row is selected after selecting the first then first will be unchecked automatically and second will be checked.
It is like a Radio Button. But in Grid layout it is populating with check box only. I have gone thru all the recipe and tutorial but not found any thing concrete to get it solved.
Could any please suggest. Thanks.
OriginalPostID-141945
OriginalPostID-141945
Discussion posts and replies are publicly visible
0
piyusha
over 10 years ago
PFA screen shot
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 10 years ago
You no longer have the option of a radio button style selection on a grid, however, you can use validation to notify the user that they should not select more than one row.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
piyusha
over 10 years ago
I implemented the process in a way that it will not add additional step in UI. It will automatically uncheck the previous selection. Problem is occurring only when resultant rows in the GRID is 2. Because while selecting 2 row after selecting first, it will automatically Check SELECT ALL option and which has validation.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 10 years ago
I suggest you add a Paragraph Field below your paging grid for debug purposes and populate it with your GridSelection information - just to watch what happens when different selections are made.
As far as I know, the "select all" checkbox indicates no more and no less than "all checkboxes on the current page are checked"; the "Selection" component within the GridSelection will only ever be an array of the selected indices. Point being, there is no way that I know of to create special functionality when the "select all" box was used: it is functionally identical to selecting all checkboxes on a page manually.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 10 years ago
I was intrigued by the possibility of having the checkboxes behave as if they are radio buttons and so made the attached example that works as such. It also copes with the "check-all" box being used - see if that helps.
radio_button_style_grid.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
piyusha
over 10 years ago
Hi Philb, I also followed similar kind of approach though in your case, if you try with only 2 records then it won't work. And there are various other cases which will not be satisfied with this approach.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 10 years ago
Hi, have a look at the attached. There's not really a way to handle checking the "select all" option but I think this is close enough...!
radio_button_style_grid.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
piyusha
over 10 years ago
Thanks Philb.. but I was also able to implement the selection. Only problem is with Select All and With 2 rows in the GRID.
Take a example - we have a condition where one can select only one row at a Time and if Select All then it will fail Validation.
Case-:
If you select first Row. Now for the selection of second Row It will automatically select All and failed Validations. Though it should uncheck the first Row and Check the second.
In your SAIL expression, you are handling this but if you "select All" multiple times then it is selecting either of the row.
And if you include validation in your expression then other case will fail i.e. selecting the second.
I tried many ways but couldn't get through.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 10 years ago
I couldn't find a way of differentiating between the select all and checking a second item when there are two rows. To be honest the SAIL I posted is a bit too complicated to be practical so you're probably better off just using validation on the grid.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 10 years ago
AFAIK you're probably better off forgetting about setting off some sort of validation when "select all" is checked - mainly because of the 2-item case you're listing. Of course you could always just make the valiation NOT happen when the length of the selection is only 2 items.
What exactly is your use case that you require validation against a user clicking the "select all" box, instead of just forcing only one item to remain selected as in the previous examples here?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>