


How can I make a form with a table that has buttons at the top to sort the user entered data? I want it to look like this: Like this: http://blogs.adobe.com/formfeed/files/formfeed/Samples/SalesReport.pdf
Views
Replies
Total Likes
Hi there,
why aren't you using the functionality created in the form you provided?
Views
Replies
Sign in to like this content
Total Likes
I can't figure out how!!
Views
Replies
Total Likes
The function seems very easy to use, but you gotta make sure that each of your values for your forms are correct...
1. Make sure you have the Script Objects names well written...
2. When calling the function sort(); the first value is the button itself which is "this", that never changes
3. the 2nd value is the instance manager of the row of your table
3. The 3rd value of the function is the name of the field that is in the column of the button clicked, so when calling the function sort, it will look for each instances of that object you specified to sort the rows...
You don't need to change any more code for the sorting, just make sure your values are well written and everything should be fine..
If it is still not working, have a look at the JavaScript Debugger pressing Ctrl + J and look at your error!
Hope this help!
Views
Replies
Sign in to like this content
Total Likes
Thanks for breaking it down for me. I have my headings (buttons) in a master page subform. Is that correct?
Views
Replies
Total Likes
That could cause errors, do you have a specific reason to put them in the master page??
Interacting with objects from master page to pages or pages to master pages may be very difficult...
I suggest you to have your whole table in a Page and not a master page..
Views
Replies
Sign in to like this content
Total Likes
Thank you so much for your help! I feel like I am close, but not quite
there. This is what I have in the ScriptEditor: functionsort(this,Row1,
TextField1) and I have verified that "this" is my button, and the row and
text field are called the correct names, but it still won't work. I put it
all on the same page, too. It shows no errors in the javascript.
Thank you!
Views
Replies
Total Likes
you should be calling the function this way :
_Row1 is equivalent to Row1.instanceManager, which is the object that the function is expecting to receive.
The 3rd value is expecting to receive a name, so a string is the expected value...
By sending TextField1 without quotes, you send the whole object of TextField1 but it only wants to receive the name of the field, so "TextField1" is more likely what you have to send in parameter!
Views
Replies
Sign in to like this content
Total Likes
Still no go. Is there a way I can send you my form?
Views
Replies
Total Likes
Do I put that script in the ScriptEditor of each button? or in the subform?
I've tried both ways with no luck, so far.
Views
Replies
Total Likes
Thanks again for your assistance! What a relief to have it finally correct!
Views
Replies
Total Likes