Solved

cursor from/to col id works different then expected

  • 6 March 2024
  • 3 replies
  • 48 views

Userlevel 1
Badge +4

Hello. When i edit a form, and look at the database event log, i see my cursor_from_col_id immediately filled out, and the cursor_to_col_id is never filled out, not even when i change fields. Is this a (known) bug or can i influence this in some way through the Software Factory? We're using Universal GUI 2024.1.10.0.0.

icon

Best answer by Anne Buit 7 March 2024, 08:49

View original

3 replies

Userlevel 7
Badge +5

Hi BramG,

The cursor_to_col_id variable is intended only as an output parameter, to steer the user to a certain input field based on other input.

There is no guarantee that the cursor is placed in another input field when the Default logic fires on input change. Furthermore, the user is free to move focus to other fields while not modifying data. In this situation, the Default logic would never even trigger.

Allowing cursor_to_col_id as input would imply the Default logic has a reliable way to know when a certain field gained focus. This is not the case.

Userlevel 1
Badge +4

Okay, that answers half of my question, thanks!

I also have default logic that triggers on ‘@cursor_from_col_id is null’, so when the form is opened and the user has not yet changed fields. However, the logic wrapped in this condition is not executed, because the cursor_from_col_id is immediately filled out, as shown in the database event logs. Can this be explained by configurations in the model or in any other way? As i recall, checking wether the @cursor_from_col_id is filled out is pretty common practice, right?

Userlevel 7
Badge +5

Yes, the caveat being that @cursor_from_col_id is only set to null when the user is adding a new row or copying an existing row.

When the user starts editing an existing row, the platform does not fire Default logic until any field is modified by the user.

Reply