Skip to main content

I am building a screen in which a barcode can be pasted and entered with a barcode scanner. For this purpose I’ve created a view with only its form visible and in it only a barcode field. This field should be editable multiple times without having to click any GUI buttons. According to the view itself these are updates of the barcode field. Behind the view is an instead of update trigger that adds the new data to a table. This works. As soon as a barcode is typed into the field and ctrl+enter’d a new row is added to the table.

The problem is the form isn’t editable immediately despite having auto-edit enabled in its subject settings. I need to click in another tab in the gui and then return to the view to have its form editable. This seems to be the standard behavior of auto-edit in tables too.

I’ve done some testing with combinations in a process flow to make the form editable without needing any user input between barcode updates but so far I’ve been unsuccessful to make this work. For example the activate form action doesn’t seem to have an effect even though I can see it runs in the process flow monitor.

How can I have a barcode field that’s infinitely editable by pasting a barcode and ctrl+enter’ing only? I found some clues in https://community.thinkwisesoftware.com/questions-conversations-78/barcode-scanning-1965 but I am unable to apply this solution to our scan view.

I’ve managed to solve the issue by also enabling auto-save. This keeps the form active after saving the record and now I can keep pasting and entering a barcode in the field without the need to press gui buttons.

This brings up a new issue. Saving the record in the view refreshes the table to which the record is saved (refresh document after update option was selected). The problem however is that the selection in this table doesn’t change. As the list gets longer than the height of the tab the selected record is kept in view. This causes new records to be added out of sight.

It is preferred that new records always appear at the top of the list not matter how long the list gets. I’ve again tried using a process flow to change the selection to the new record. This works but it brings the problem back of not keeping the form of the scan view active. Is there a way to always keep the newly added record in view while keeping the form active?

 

6 records fit into the height of the tab.

 

When a 7th record is added by entering it into the scan view on the right the 6 existing records remain in place and the new record is added to the top out of sight.

 


Could an alternative sorting help out? For example, I see the Scanned on (Gescand op) field, if you would fill that with the current datetime, you can then sort on it Descending. All new record will have a later datetime than the previous scan and thus always be shown at the top.


The current sort order is a sequence number in a hidden column so I don’t think that would change the situation. Basically what happens is that the selected row in blue doesn’t scroll out of sight. From adding the first row it moves down a position every consecutive addition. It does this until it reaches the bottom position. From then on it stays in view and new rows are added at the top out of sight. You can see this happen when clicking on the first image and then on the right arrow to the next image. The change in position is exactly what it looks like in the gui.

Here’s an animation to visualize what happens in the gui:

The selected line has sequence number 1 and stays selected. New lines are added from the top. As soon as the line numbered as 1 reaches the bottom position it stops moving further down as consecutive higher numbered lines are added to the list.

To be clear. The “Nr” field in the scan view on the right is not the same as the sequence number.


I turned this into an idea.


Reply