Hi guys i am really new in programming and i really dont know if this is a nonsensical question but i really need your help.
I have a form which has several variables and a browse. i would like to allow my user to be able to filter the browse from each variable. I am using the action scripting and my query seemed to be not working.
records_found = topparent.queryrun("if(isblank(\"Var->varsodatefrom\")=.f. .and. isblank(\"Var->varsodateto\")=.f. ,between(Sodate,Var->varsodatefrom,Var->varsodateto),if(isblank(\"Var->varsodatefrom\")=.f. .and. isblank(\"Var->varsodateto\")=.t. ,between(Sodate,Var->varsodatefrom,date()), if(isblank(\"Var->varsodatefrom\")=.t. .and. isblank(\"Var->varsodateto\")=.t.,between(Sodate,Var->varsodatefrom,date()),isnotblank(\"Sodate\")=.t.))) .and. if(isblank(\"Var->varso\")=.f., left(Sodocno,len(Var->varso)) = Var->varso, isnotblank(\"Sodocno\")=.t.) .and. if(isblank(\"Var->varbpno\") = .f., Bpno=Var->varbpno, isnotblank(\"Bpno\")) .and.
if(Var->varproduct_group <> 0, Product_Group=Var->varproduct_group, Product_Group>0) .and.
if(Var->vardiscountgroup <> 0, Discountgroup=Var->vardiscountgroup, Discountgroup >= 0) .and.
if(isblank(\"Var->varstatus\") = .f., Linestatus = Var->varstatus, isnotblank(\"Linestatus\")=.t.).and.
if(Var->varconstruction <> 0, Items->Construction=Var->varconstruction, Items->Construction<>0) .and. if(isblank(\"Var->vartwinefinal\")=.f., Items->Twine_final=Var->vartwinefinal, Items->Twine_final<>0) .and. if(isblank(\"Var->varknots\")=.f., Items->Knots=Var->varknots, Items->Knots<>0) .and. if(isblank(\"Var->varlength\")=.f., Items->Legth=Var->varlength, Items->Legth<>0) .and. if(isblank(\"Var->varmd\")=.f., Items->Md=Var->varmd, Items->Md<>0) .and. if(isblank(\"Var->varms\")=.f., Items->Ms=Var->varms, Items->Ms<>0) .and. if(isblank(\"Var->varweight\")=.f., Items->Weight=Var->varweight, Items->Weight<>0) .and. if(Var->varcolor <> 0, Items->Color=Var->varcolor, Items->Color<>0) .and. if(Var->varuom <> 0, Items->Unit_of_measure=Var->varuom , Items->Unit_of_measure<>0)","","","No", "<Cross Level>",.f.)
This query is actually for 16 variables. Is there any limit on how many can i query using this queryrun()? thanks for the help.
I have a form which has several variables and a browse. i would like to allow my user to be able to filter the browse from each variable. I am using the action scripting and my query seemed to be not working.
records_found = topparent.queryrun("if(isblank(\"Var->varsodatefrom\")=.f. .and. isblank(\"Var->varsodateto\")=.f. ,between(Sodate,Var->varsodatefrom,Var->varsodateto),if(isblank(\"Var->varsodatefrom\")=.f. .and. isblank(\"Var->varsodateto\")=.t. ,between(Sodate,Var->varsodatefrom,date()), if(isblank(\"Var->varsodatefrom\")=.t. .and. isblank(\"Var->varsodateto\")=.t.,between(Sodate,Var->varsodatefrom,date()),isnotblank(\"Sodate\")=.t.))) .and. if(isblank(\"Var->varso\")=.f., left(Sodocno,len(Var->varso)) = Var->varso, isnotblank(\"Sodocno\")=.t.) .and. if(isblank(\"Var->varbpno\") = .f., Bpno=Var->varbpno, isnotblank(\"Bpno\")) .and.
if(Var->varproduct_group <> 0, Product_Group=Var->varproduct_group, Product_Group>0) .and.
if(Var->vardiscountgroup <> 0, Discountgroup=Var->vardiscountgroup, Discountgroup >= 0) .and.
if(isblank(\"Var->varstatus\") = .f., Linestatus = Var->varstatus, isnotblank(\"Linestatus\")=.t.).and.
if(Var->varconstruction <> 0, Items->Construction=Var->varconstruction, Items->Construction<>0) .and. if(isblank(\"Var->vartwinefinal\")=.f., Items->Twine_final=Var->vartwinefinal, Items->Twine_final<>0) .and. if(isblank(\"Var->varknots\")=.f., Items->Knots=Var->varknots, Items->Knots<>0) .and. if(isblank(\"Var->varlength\")=.f., Items->Legth=Var->varlength, Items->Legth<>0) .and. if(isblank(\"Var->varmd\")=.f., Items->Md=Var->varmd, Items->Md<>0) .and. if(isblank(\"Var->varms\")=.f., Items->Ms=Var->varms, Items->Ms<>0) .and. if(isblank(\"Var->varweight\")=.f., Items->Weight=Var->varweight, Items->Weight<>0) .and. if(Var->varcolor <> 0, Items->Color=Var->varcolor, Items->Color<>0) .and. if(Var->varuom <> 0, Items->Unit_of_measure=Var->varuom , Items->Unit_of_measure<>0)","","","No", "<Cross Level>",.f.)
This query is actually for 16 variables. Is there any limit on how many can i query using this queryrun()? thanks for the help.