why aren't you using the functionality created in the form you provided?
I can't figure out how!!
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..
Hope this help!
Thanks for breaking it down for me. I have my headings (buttons) in a master page subform. Is that correct?
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..
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
you should be calling the function this way :
SubformSort.sort(this, _Row1, "TextField1");
_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!
Still no go. Is there a way I can send you my form?
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.
Thanks again for your assistance! What a relief to have it finally correct!