Hello,
I am trying to create a button on a form that will sequentially run a set of saved operations. I have very limited Xbasic knowledge and am using the action scripting tool in alpha 5 Version 9.
All the operations run perfectly when launched through the control panel however when I fuse them into a button the results are not the same.
The first action of the “button” is to locate events happening on a specific “date.” The user is prompted to enter the date through a calendar drop down button in a date field so there is no chance that the date can be entered incorrectly. (btw This works properly in the form button I am trying to create and the correct records appear in a browser)
The Second action is to mark all the selected dates. This is another saved operation that is supposed to mark the records that the used prompted for. The action scripting marks all the records in the table
Third action is to print a report based only on the selected marked records. This report is based on marked records and all the records are included in the report instead of the records selected by the date prompt
Forth action is to unmark the records… The system unmarks all the records in the table
There is only one table being access for this report… no sets… This should be a cake walk.
When I run these steps through the control panel the report is flawless… When I use the button, the action scripting marks all the records in the table and gives me a report of every record which is useless.
If I choose the “Currently selected records” option in the script gene: Run Saved Operation I get an error message
Script: TEMPLATE line 22
Rec_count=a5_get_records_in_query(“mastours”,current_fillter,-1,.f.+”.and.(.
Variable is of different type
Any thoughts on how I can combine these functions into on button on a form would be greatly appreciated..
All my Best
Hunter
I am trying to create a button on a form that will sequentially run a set of saved operations. I have very limited Xbasic knowledge and am using the action scripting tool in alpha 5 Version 9.
All the operations run perfectly when launched through the control panel however when I fuse them into a button the results are not the same.
The first action of the “button” is to locate events happening on a specific “date.” The user is prompted to enter the date through a calendar drop down button in a date field so there is no chance that the date can be entered incorrectly. (btw This works properly in the form button I am trying to create and the correct records appear in a browser)
The Second action is to mark all the selected dates. This is another saved operation that is supposed to mark the records that the used prompted for. The action scripting marks all the records in the table
Third action is to print a report based only on the selected marked records. This report is based on marked records and all the records are included in the report instead of the records selected by the date prompt
Forth action is to unmark the records… The system unmarks all the records in the table
There is only one table being access for this report… no sets… This should be a cake walk.
When I run these steps through the control panel the report is flawless… When I use the button, the action scripting marks all the records in the table and gives me a report of every record which is useless.
If I choose the “Currently selected records” option in the script gene: Run Saved Operation I get an error message
Script: TEMPLATE line 22
Rec_count=a5_get_records_in_query(“mastours”,current_fillter,-1,.f.+”.and.(.
Variable is of different type
Any thoughts on how I can combine these functions into on button on a form would be greatly appreciated..
All my Best
Hunter
Comment