Hi there,
I have a database attached.
Problem is I need to get a shared variable s_acc_id into an Operation filter.
To get to the problem :
1 On loading db, Debtors Ledger Banner displays
2 Select Enquire Accounts - 6 button
3 Error mess box displays - no such field. Key Enter
4 Find by Key displays. key "FLEET" FLEET AFRICA displays
5 Error mess box displays - no such field. Key Enter
Go into design mode of the Form Debt_Enq_m. Select OnFetch Event of Form. The actions display. The problem action is the Run saved Operation
Tag dspl_enqf_OnFetch.
If you select Control Panel and Operations tab - select Update Operation Tag_dspl_enqf_OnFetch - design. When it displays, Select Records - Filter expression
(Acc_Id = s_acc_id
.AND.
Batch_Start_Date >= Var->gd_past1
.AND.
Batch_Start_Date gd_curr)
.OR.
(Acc_Id = s_acc_id
.AND.
Outstand_Amnt 0)
The problem is that the filter does not recognize variable s_acc_id (which is initiated in Form Debt_Enq_m). If you delete the variable it works fine. The filter is then
Batch_Start_Date >= Var->gd_past1
.AND.
Batch_Start_Date gd_curr
.OR.
Outstand_Amnt 0
Problem is that it tags all the accounts in the database regardless of which Account id. It still works ok because Form Debt_enq filters out all Accounts except the Account of interest Acc_id. I'm not comfortable with this. I also need to have control of what I'm doing.
Back to the OnFetch Event of Form, the first action which is commented out - Running a script, does the job for me using XBasic, but it is considerably slower than the Operation Tag_dspl_enqf_OnFetch. As you can see from the Actions, I have played around tracing s_acc_id to the Trace Window, and the var s_acc_id is seen by the trace in both XBasic and otherwise, but I cannot get the Operation to "see" it.
Any way around this ?
I have a database attached.
Problem is I need to get a shared variable s_acc_id into an Operation filter.
To get to the problem :
1 On loading db, Debtors Ledger Banner displays
2 Select Enquire Accounts - 6 button
3 Error mess box displays - no such field. Key Enter
4 Find by Key displays. key "FLEET" FLEET AFRICA displays
5 Error mess box displays - no such field. Key Enter
Go into design mode of the Form Debt_Enq_m. Select OnFetch Event of Form. The actions display. The problem action is the Run saved Operation
Tag dspl_enqf_OnFetch.
If you select Control Panel and Operations tab - select Update Operation Tag_dspl_enqf_OnFetch - design. When it displays, Select Records - Filter expression
(Acc_Id = s_acc_id
.AND.
Batch_Start_Date >= Var->gd_past1
.AND.
Batch_Start_Date gd_curr)
.OR.
(Acc_Id = s_acc_id
.AND.
Outstand_Amnt 0)
The problem is that the filter does not recognize variable s_acc_id (which is initiated in Form Debt_Enq_m). If you delete the variable it works fine. The filter is then
Batch_Start_Date >= Var->gd_past1
.AND.
Batch_Start_Date gd_curr
.OR.
Outstand_Amnt 0
Problem is that it tags all the accounts in the database regardless of which Account id. It still works ok because Form Debt_enq filters out all Accounts except the Account of interest Acc_id. I'm not comfortable with this. I also need to have control of what I'm doing.
Back to the OnFetch Event of Form, the first action which is commented out - Running a script, does the job for me using XBasic, but it is considerably slower than the Operation Tag_dspl_enqf_OnFetch. As you can see from the Actions, I have played around tracing s_acc_id to the Trace Window, and the var s_acc_id is seen by the trace in both XBasic and otherwise, but I cannot get the Operation to "see" it.
Any way around this ?
Comment