MikeKD Posted September 12, 2013 Posted September 12, 2013 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
No_access Posted September 12, 2013 Posted September 12, 2013 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.
Lee Smith Posted September 12, 2013 Posted September 12, 2013 Why not change the tab order so that they go to the next field? 1
MikeKD Posted September 12, 2013 Author Posted September 12, 2013 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.....
No_access Posted September 12, 2013 Posted September 12, 2013 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.
MikeKD Posted September 12, 2013 Author Posted September 12, 2013 Thanks for these; I was still searching for them!! Right, now to attempt the scripting; eek...
MikeKD Posted September 12, 2013 Author Posted September 12, 2013 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
No_access Posted September 12, 2013 Posted September 12, 2013 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.
eos Posted September 12, 2013 Posted September 12, 2013 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
MikeKD Posted September 12, 2013 Author Posted September 12, 2013 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.
MikeKD Posted September 12, 2013 Author Posted September 12, 2013 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
No_access Posted September 12, 2013 Posted September 12, 2013 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.
MikeKD Posted September 12, 2013 Author Posted September 12, 2013 Oh blimey, that's a good point. Mmmm, may rethink the need to go left & right, will sleep on it! Thanks!
No_access Posted September 12, 2013 Posted September 12, 2013 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...
eos Posted September 12, 2013 Posted September 12, 2013 Before you embark on anything elaborate, don't forget that you can set a tab order for the fields on your layout.
Lee Smith Posted September 13, 2013 Posted September 13, 2013 (edited) See post #3 You might want to look at this in your help setting the tabs Edited September 13, 2013 by Lee Smith Added the tab link
MikeKD Posted September 13, 2013 Author Posted September 13, 2013 Oh boy, that's really useful. I had been searching, but didn't know what I was looking for. Many thanks!
bcooney Posted September 14, 2013 Posted September 14, 2013 In twenty years, I've never scripted the tab order. Be wary of adopting a spreadsheet paradigm with FileMaker.
MikeKD Posted September 14, 2013 Author Posted September 14, 2013 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!
Recommended Posts
This topic is 4090 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now