Here is a piece of information that might be of use to some users who are working with one-one sets and doing data entry into the linking field using Xbasic.
Say you have a set with a one-one link. For example:
order_header----->customer
Tables are linked on "customer_id".
Assume that you have built a form for this set.
Enter a new record. Type in a valid customer_id. As SOON as you tab out of the customer_id field, Alpha Five displays the matching values from the "customer_id" field - as you would expect.
However, now assume that instead of typing in the value into "customer_id", you have an Xbasic script that fills in the value. For example, you might have a button on the form. Assume that the script attached to this button is:
customer_id.text = "1234"
Now, when you enter a new record, then click on the button, the matching data from the "customer" table is NOT shown when you tab out of the customer_id field. Infact, the matching data is only shown when you commit the "order_header" record.
This is probably NOT what you would either like or expect.
HOWEVER, if you change your script to this:
customer_id.activate()
customer_id.text = "1234"
then it works as you would expect.
The reason is that if you want Alpha Five to behave the same in this instance regardless of whether the value in "customer_id" is being typed by the user, or set by Xbasic, then you have to have the Xbasic script give focus to "customer_id" before the value is set, just as is the case when the user types the value.
Say you have a set with a one-one link. For example:
order_header----->customer
Tables are linked on "customer_id".
Assume that you have built a form for this set.
Enter a new record. Type in a valid customer_id. As SOON as you tab out of the customer_id field, Alpha Five displays the matching values from the "customer_id" field - as you would expect.
However, now assume that instead of typing in the value into "customer_id", you have an Xbasic script that fills in the value. For example, you might have a button on the form. Assume that the script attached to this button is:
customer_id.text = "1234"
Now, when you enter a new record, then click on the button, the matching data from the "customer" table is NOT shown when you tab out of the customer_id field. Infact, the matching data is only shown when you commit the "order_header" record.
This is probably NOT what you would either like or expect.
HOWEVER, if you change your script to this:
customer_id.activate()
customer_id.text = "1234"
then it works as you would expect.
The reason is that if you want Alpha Five to behave the same in this instance regardless of whether the value in "customer_id" is being typed by the user, or set by Xbasic, then you have to have the Xbasic script give focus to "customer_id" before the value is set, just as is the case when the user types the value.
Comment