This may have been known for a long time, but I thought I'd post it anyway, since it wasn't something I had ever encountered...
Using Alpha Five vers. 4, build 230.
The button genie will not generate a correct script in the following situation:
1) Field rule uses a mask in data entry on your linking field in the calling form; and
2) Field rule uses a mask in data entry on your linking field in the called form; and
3) Mask literals are not stored in either linking field; and
4) You use the linking field to identify those records in a second form that is opened by the button; and
5) You tell the genie to 'show only records where' the value of the linking field matches the value in the control on your form.
Using the Built In Action (Perform Single Task) option within the button genie you can easily open a second form. The genie will give you the option to 'show only records where...' in order to limit the range of records which will be displayed in the second form. To do this you must specify the identity of the field in the called form which you want to match a value shown on the current (calling) form. After the fields are identified the genie builds a little script and attaches it to the OnPush event for the button. Normally this works just fine. But masked literals which are not stored in the actual field will cause it to fail.
The script will not work if the linking field, as displayed on the form, includes mask literals which are not part of the actual field in the table. The generated script pulls the value of the control from the form, not the value of the field from the table upon which the form is based. This means it includes the mask literals as part of the 'value' of the linking field, even though these characters are not actually present in that field in the table. It then uses that value to build the query to run against the called form. Since masked literals are not present in the linking field there, the query fails every time.
The result is non-obvious. It looks like Alpha Five is broken, when actually what happens is that the query generated by the genie fails, but the called form gets opened anyway.
-- tom
Using Alpha Five vers. 4, build 230.
The button genie will not generate a correct script in the following situation:
1) Field rule uses a mask in data entry on your linking field in the calling form; and
2) Field rule uses a mask in data entry on your linking field in the called form; and
3) Mask literals are not stored in either linking field; and
4) You use the linking field to identify those records in a second form that is opened by the button; and
5) You tell the genie to 'show only records where' the value of the linking field matches the value in the control on your form.
Using the Built In Action (Perform Single Task) option within the button genie you can easily open a second form. The genie will give you the option to 'show only records where...' in order to limit the range of records which will be displayed in the second form. To do this you must specify the identity of the field in the called form which you want to match a value shown on the current (calling) form. After the fields are identified the genie builds a little script and attaches it to the OnPush event for the button. Normally this works just fine. But masked literals which are not stored in the actual field will cause it to fail.
The script will not work if the linking field, as displayed on the form, includes mask literals which are not part of the actual field in the table. The generated script pulls the value of the control from the form, not the value of the field from the table upon which the form is based. This means it includes the mask literals as part of the 'value' of the linking field, even though these characters are not actually present in that field in the table. It then uses that value to build the query to run against the called form. Since masked literals are not present in the linking field there, the query fails every time.
The result is non-obvious. It looks like Alpha Five is broken, when actually what happens is that the query generated by the genie fails, but the called form gets opened anyway.
-- tom
Comment