So this issue has been a plague for some months and I have yet to figure out a solid solution..
I have a text field (Badge ID) that has lookup enabled. The lookup type is Edit-Combo List. In my lookup definition I have it set to Dynamic to where it looks up all 'Active Badge Numbers' from the Employee Table in SQL. Once the badge number is found, it's set to fill in some other important information about the employee in the other text fields (Employee ID, First Name, Last Name, Designation and Credit Balance). This is illustrated below.
1.jpg
Now, one of the requirements of this application is that I had to use RFID scanning to validate employees against the database. With that being said, I have set initial focus to the text field (Badge ID) when the component loads and I am able to scan RFID badges accordingly and all of the related employee information gets filled in to the other fields based on the badge number. This is illustrated below.
2.jpg
My issue is - each employee has a running credit balance. When the badge is scanned and items are issued to the employee, an amount is deducted from their credit balance. The deduction itself works and reflects correctly in the database. However, say I scan the employee's badge, the employee has a balance of $60 and I issue an item to that employee valued at $20. Submit it to the database. Now, if I scan that same employee's badge again after issuing that $20 item, the credit balance should show $40.. However, it does not! It shows $60. BUT if I refresh the entire application, scan that employee's badge, it will show $40... I need the balance to update in real-time. I'm assuming their has to be some sort of callback to accomplish this?
I've tried a number of things including changing the 'Load Data Method' for the Badge ID field to Ajax Callback. Doing this did not help as when the badge is scanned into the text field, I guess the callback is not fast enough or something? It does not function the way I'm needing it to function.
The clerk should be able to just scan badge, the relevant information is filled in, items get issued and submits. That's the flow.
Any help would be greatly appreciated!
P.S. This is exactly what occurs when I change the 'Load Data Method' to AJAX Callback instead of AtRender Time:
3.jpg
Notice that it no longer fills in all of the other relevant data, including the balance.
I have a text field (Badge ID) that has lookup enabled. The lookup type is Edit-Combo List. In my lookup definition I have it set to Dynamic to where it looks up all 'Active Badge Numbers' from the Employee Table in SQL. Once the badge number is found, it's set to fill in some other important information about the employee in the other text fields (Employee ID, First Name, Last Name, Designation and Credit Balance). This is illustrated below.
1.jpg
Now, one of the requirements of this application is that I had to use RFID scanning to validate employees against the database. With that being said, I have set initial focus to the text field (Badge ID) when the component loads and I am able to scan RFID badges accordingly and all of the related employee information gets filled in to the other fields based on the badge number. This is illustrated below.
2.jpg
My issue is - each employee has a running credit balance. When the badge is scanned and items are issued to the employee, an amount is deducted from their credit balance. The deduction itself works and reflects correctly in the database. However, say I scan the employee's badge, the employee has a balance of $60 and I issue an item to that employee valued at $20. Submit it to the database. Now, if I scan that same employee's badge again after issuing that $20 item, the credit balance should show $40.. However, it does not! It shows $60. BUT if I refresh the entire application, scan that employee's badge, it will show $40... I need the balance to update in real-time. I'm assuming their has to be some sort of callback to accomplish this?
I've tried a number of things including changing the 'Load Data Method' for the Badge ID field to Ajax Callback. Doing this did not help as when the badge is scanned into the text field, I guess the callback is not fast enough or something? It does not function the way I'm needing it to function.
The clerk should be able to just scan badge, the relevant information is filled in, items get issued and submits. That's the flow.
Any help would be greatly appreciated!
P.S. This is exactly what occurs when I change the 'Load Data Method' to AJAX Callback instead of AtRender Time:
3.jpg
Notice that it no longer fills in all of the other relevant data, including the balance.
Comment