September 12, 201312 yr Hi folks, I'm stuck again!! I have a portal I'm using to input grades for class asessments. At the moment, to go from one row to the next I have to click on it with the curser. When I tab, I go to the start of the next row and have to then tab across to get to the same field on that row. I'd really like to be able to tab (or use the keyboard arrows) to navigate the same field on different rows of the portal, ideally using arrows to go to different fields on the same row; just like you would on a spreadsheet. Is the possible? I've tried with script triggers, but have had no luck! Cheers, MIke
September 12, 201312 yr You can capture keystrokes using script triggers and this should work just fine, here is the script I use to convert the insert key into a | , my users are just use to using the insert key from old dos days...   all you need to do is capture the keystrokes for the arrow keys and use the goto object script step. (be sure to assign object names to the fields you want to navigate) and if you want to navigate in a portal, you need to capture the current portal row and set that variable as well. so you can go up or down rows.
September 12, 201312 yr Author Thanks chaps, It's nice to know it's possible! I like the potential simplicity of Lee's solution, but don't know how to do it or if it would do enough. I suspect that I'm going to be going into the kind of scripting described by No_access. I'm now looking up how to capture the keystrokes.....
September 12, 201312 yr Tab order is easiest, but does not give you the flexibility you want. scripting will. also according to filemaker the codes for the arrow keys are left arrow - 28 up-arrow - 29 right arrow - 30 Down arrow - 31 let us know if we can be of further assistance.
September 12, 201312 yr Author Thanks for these; I was still searching for them!! Right, now to attempt the scripting; eek...
September 12, 201312 yr Author Well I've had a some success.... kind of! Â I've attached my script. It sort of works for the down arrow, sending the cursor to the bottom of the portal instead of just down one row. It doesn't seem to work for the up arrow. Is that because it only checks for the first IF, and I need to do a loop if it's to keep checking for both? Â Cheers! Mike
September 12, 201312 yr Your end if's are in the wrong place.. you could also use else if or a case statement move the 1st end if above the second if statement.
September 12, 201312 yr Is that because it only checks for the first IF, and I need to do a loop if it's to keep checking for both? See if this sample helps you. PortalNav_eos.fp7.zip
September 12, 201312 yr Author Many thanks; I'm not sure why I put them like that; the proper way makes much more sense. The move to previous / next portal row still doesn't work though, it goes to the top or bottom row instead.
September 12, 201312 yr Author Many thanks, got it now. I think I'd put the go to field bit in the wrong place too. I'll now attempt to make it move left and right. what could possibly go wrong? :-) BTW, I must say that the help you guys give on this site is incredible; thanks! Mike
September 12, 201312 yr Just one added little tip. when making it go left and right, you may want the check the location of the cursor and make sure it is at the beginning or the end of the text. that way they can still use the arrow keys to edit the text they are in.
September 12, 201312 yr Author Oh blimey, that's a good point. Mmmm, may rethink the need to go left & right, will sleep on it! Thanks!
September 12, 201312 yr It is still very easy to do. and should work well. now you could use the script trigger for the up and down in conjunction with the tab order for left and right in this case if you wanted...
September 12, 201312 yr Before you embark on anything elaborate, don't forget that you can set a tab order for the fields on your layout.
September 13, 201312 yr See post #3 You might want to look at this in your help setting the tabs Edited September 13, 201312 yr by Lee Smith Added the tab link
September 13, 201312 yr Author Oh boy, that's really useful. I had been searching, but didn't know what I was looking for. Many thanks!
September 14, 201312 yr In twenty years, I've never scripted the tab order. Be wary of adopting a spreadsheet paradigm with FileMaker.
September 14, 201312 yr Author It seems to work really well now; the up and down arrows take me to different portal rows and I can then tab between the 3 fields most likely to have data input. Cheers!
Create an account or sign in to comment