I am trying to text a report that contains only an inventory item or record that was just sold. I have a button on a form that when pushed I want to save the record (with sales info entered, which also removes it from current inventory) and then sends the text.
To accomplish this I am using action scripting to do the 3 following steps:
1. Store the inventory number of the sold item in a shared variable name "num"
2. Saves the record (which removes it from current inventory and the next inventory item becomes the current record)
3. Email or text a report with only the one sold record in the report. (I am trying to get this record by using a variable named "num")
The text is being sent, but the text does not include the sold item, it includes the next inventory item which has focus after the sold item is removed, by saving the record
Below is code produced by using action scripting:
'
query.filter = "inv_num = Var->num"
query.order = "recno()"
'replace variables in the filter with their actual values
query.filter = convert_expression(query.filter,"VE")
to_param = a5_eval_expression("\"[email protected]\"",local_variables())
cc_param = a5_eval_expression("",local_variables())
bcc_param = a5_eval_expression("",local_variables())
subject_param = a5_eval_expression("Just Sold",local_variables())
message_param = a5_eval_expression("",local_variables())
:Report.Send("Just_Sold","TXT",query.filter,query.order,"default",to_param,subject_param,message_param,cc_param,bcc_param)
Not sure what "query.filter = convert_expression(query.filter,"VE")" does ??
Thanks for any help or tips
Tony
To accomplish this I am using action scripting to do the 3 following steps:
1. Store the inventory number of the sold item in a shared variable name "num"
2. Saves the record (which removes it from current inventory and the next inventory item becomes the current record)
3. Email or text a report with only the one sold record in the report. (I am trying to get this record by using a variable named "num")
The text is being sent, but the text does not include the sold item, it includes the next inventory item which has focus after the sold item is removed, by saving the record
Below is code produced by using action scripting:
'
query.filter = "inv_num = Var->num"
query.order = "recno()"
'replace variables in the filter with their actual values
query.filter = convert_expression(query.filter,"VE")
to_param = a5_eval_expression("\"[email protected]\"",local_variables())
cc_param = a5_eval_expression("",local_variables())
bcc_param = a5_eval_expression("",local_variables())
subject_param = a5_eval_expression("Just Sold",local_variables())
message_param = a5_eval_expression("",local_variables())
:Report.Send("Just_Sold","TXT",query.filter,query.order,"default",to_param,subject_param,message_param,cc_param,bcc_param)
Not sure what "query.filter = convert_expression(query.filter,"VE")" does ??
Thanks for any help or tips
Tony
Comment