Skip to main content
Solved

How to use cursor_to_col_id in Default procedures


Harm Horstman
Superhero
Forum|alt.badge.img+21

What is the purpose of the parameter cursor_to_col_id?

I tried to move the cursor to a specific next field after moving another field. 

Just adding a statement like below, does not make any difference.

SET @cursor_to_col_id = 'document_number'

Could anybody give an example or explanation on how to do this? 

 

Best answer by Frank Wijnhout

The tab key on a keyboard is used in Windows to advance the cursor to the next tab stop. This is not something we want (or can?) override in the GUI. 

Therefore we use the Enter key for going to the next field. Enter skips the buttons behind fields, Enter lets the cursor go to a next tab page when leaving the last field on a tab page and it also responds to @cursor_to_col_id.

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

7 replies

Erik Brink
Moderator
Forum|alt.badge.img+5
  • Moderator
  • 497 replies
  • March 10, 2020

This is indeed the way to use it.

Note that the GUI could be a little picky whether to listen to this setting from the SP dependent on how you left the previous field. This will not work when you leave the previous by mouse for example.

Which GUI we are talking about?


Forum|alt.badge.img+17
  • Moderator
  • 761 replies
  • March 10, 2020

This seems to only work when using enter to apply the change. Using tab or the mouse ignores the setting and just goes to the next field. 


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 495 replies
  • March 10, 2020

Actually this is what I try to do now.:

IF @cursor_from_col_id = 'document_number' AND @invoice_id IS NULL 
 IF EXISTS (SELECT 1 FROM invoice WHERE document_number = @document_number)
 BEGIN

 EXEC dbo.tsf_send_message 'document_number_already_exists', NULL, 0

 SET @document_number = NULL
 SET @cursor_to_col_id = 'document_number'

 RETURN
 END

Whatever I try, it does not work. Even when I remove the tsf_send_message line.

The model is in 2019.1, the GUI is Windows 2020.1.12

The output of the procedure, seems to be correct.


Forum|alt.badge.img+17
  • Moderator
  • 761 replies
  • March 10, 2020

does it also not work when applying the change to the column document_number using the enter key? It works perfectly fine if i use enter. 


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 495 replies
  • March 10, 2020

Yes, only when using the Enter Key it works fine.

Good to know this, but also the Tab key is often used by users.

Is there any reason to not enable this option?

In my example tsf_message, is triggered in any case (mouse, tab, enter) on wrong input

 


Frank Wijnhout
Thinkwise blogger

The tab key on a keyboard is used in Windows to advance the cursor to the next tab stop. This is not something we want (or can?) override in the GUI. 

Therefore we use the Enter key for going to the next field. Enter skips the buttons behind fields, Enter lets the cursor go to a next tab page when leaving the last field on a tab page and it also responds to @cursor_to_col_id.

 


Forum|alt.badge.img+13
  • Sidekick
  • 123 replies
  • April 28, 2020

It seems that this parameter does not work in the mobile GUI? Is that correct? We have a task where we need to scan a barcode whith a barcode scanner. We want to set the cursor actively in the field which should be set active before scanning.

On every scanning task the user always need to activate the field first before he’s able to scan?

Does anyone know about this behaviour?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings