AnsweredAssumed Answered

Tabbing to next record in list view

Question asked by abbadonnergal on Feb 9, 2012
Latest reply on Feb 20, 2012 by abbadonnergal


Tabbing to next record in list view


So every user under the sun wants to be able to tab through an interface whether or not they are in form view or list view, and most of them don't know the difference. But if I have 3 fields in a list view hitting tab will take me from field 1, to field 2 to field 3 and back to field 1 again. One would assume that a simple script trigger (on object exit) on the 3rd field with 1 Go To Record (next) step would do the trick, but that takes me to the very last record in my found set! And why do I need "Exit After Last" if I'm not in a loop? I've found that sometimes putting a Go to Next Field step either before or after the Go To Record (next) step does the trick, but not always. Here's the specific situation I'm dealing with:

Inventory Stock Counting Procedure:

3 fields per record requiring data input, viewed in list view. 1st field = CaseQnty (number of items in a case), 2nd field = CasesInStock (unopened cases), 3rd field = IndividualInStock (items not in cases). The total inventory quantity calculates itself. IndividualInStock can equal the final amount if the first 2 fields are blank, or can equal field 1 * field 2 + field 3. Depends on if the person counting stock needs Filemaker to help him/her count. So...

If the user selects sets a global field (zgCountBy) to "Case", the user can let Filemaker calculate the quantity in stock based on all 3 fields. If the user wants to do his/her own math and input 1 value, he/she sets zgCountBy to "Individual". I have script triggers (on Object Enter) on the first 2 fields that evaluate whether or not the zgCountBy field is set to "Case" or "Individual". So if it's set to "Case" it exits the script and allows data input, but if it's "Individual" it goes to the 3rd field.

After the user has input data for the first record I want the Tab button to take them to the next record. If zgCountBy = "Case" it should take them to the 1st field in the next record. If zgCountBy = "Individual" it should take them to the 3rd record. I've tried several different approaches, but I can't seem to figure out how to get it to work when zgCountBy is set to "Individal". Here is the script:

 If [INY__Inventory::zgCountBy = "Case"]

Go to Next Field

Go to Record/Request/Page [Next; Exit after last]


Go to Record/Request/Page [Next; Exit after last]

Go to Field [Select/perform; iny_STK__StockTakeCreate::IndividualInStock]

End If

When zgCountBy is set to "Case" this works beautifully, tabbing through field 1, 2, 3 and to field 1 of the next record. Without the Go to Next Field step, the user goes to field 3 in the next record. With that step, it first goes back to field 1 and then to field 1 in the next record. When zgCountBy is set to "Individual" the script trigger on field 3 sends the user flying to the last record in the found set and goes to field 1, instead of the field I indicated in the script. The tab order is set to fields only and there are only 3 steps (on fields 1, 2 and 3). I can't seem to crack this one :-(