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
7 replies
Subscribers
7 subscribers
Views
2544 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I would like to know better way to select a row from a grid. Appian 6
foussenik
over 11 years ago
I would like to know better way to select a row from a grid.
Appian 6.5.3...
OriginalPostID-104041
OriginalPostID-104041
Discussion posts and replies are publicly visible
0
Aleksi White
Appian Employee
over 11 years ago
Could you provide more detail on what you're looking for?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
foussenik
over 11 years ago
I am going to create a grid based on web service call result. Based on grid a user can select only one row, then I will need to get data from selected row.
I was thinking to add radio button on each row that user can choose to indicate chosen row, it does not appear that will work because radio button is being toggle for each row not entire grid.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim Nguyen
Appian Employee
over 11 years ago
check out our documentation on how to make paging grid selectable
forum.appian.com/.../Paging_Grid_Component
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
foussenik
over 11 years ago
This is Appian 6.5.3. I don't have Paging Grid available in form designer.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
Since you are in an old version you can use a different approach:
1. Use JavaScript validation so the user cannot select more than one. See example at
forum.appian.com/.../48235
In the example I am simply doing a Custom JS Validation.
return window.FormAPI.getValue("favActorCheckbox").id.split("1").length -1 == 1
2. Use JavaScript to uncheck all previously checkboxes except for the one that the user is clicking on. See example at
forum.appian.com/.../48235
his function does the trick:
function checkDoneWhenAnsweredPara(answerFieldInput, doneCheckboxFieldInput) {
var selectedIndex = window.FormDesigner.lastRowEvent;
if (selectedIndex == 0) {
answerField = $('#fd_component_' + window.FormDesigner.runtimeNamespace+answerFieldInput+ '_' + selectedIndex);
doneCheckBox = $('#checkboxControl_fd_component_' + window.FormDesigner.runtimeNamespace+doneCheckboxFieldInput);
} else {
answerField = $('#fd_component_' + window.FormDesigner.runtimeNamespace+answerFieldInput+ '_' + selectedIndex);
doneCheckBox = $('#checkboxControl_fd_component_' + window.FormDesigner.runtimeNamespace+doneCheckboxFieldInput+ '_' + selectedIndex);
}
if (answerField != null && answerField.html() != '') {
doneCheckBox.attr('checked',true);
} else {
doneCheckBox.attr('checked',false);
}
}
In the example, the process model is under Process Models – Forum and is called Checkboxes and Paragraph Grid with a JavaScript file called gridYesNoAndParagraph.js under Default Community > Temporary Documents Knowledge Center > Temporary Documents>JS Libraries.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
foussenik
over 11 years ago
Eduado,
It looks like the second example url is going to first one, can you provide correct url?
Also, to get selected row data, I need a js, any suggestion?
Thanks.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
1. My bad, the second example is
forum.appian.com/.../10010
2. Since the checkbox will be stored in a node input as an array of booleans you will be able to determine what index was selected and using the where() function you can pick the same index but in the other array of interest.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel