I remember pieces of my solution, but can't seem to find them in the
archive.
I need to display 1 to many batched row sets from the same table
based on a "status". (hopefully won't be more than 3). For instance,
three lists/tables/rowsets of POs for a customer by status "on hold",
"pending", "etc".
I'd like to call/include one script "qry_PO_By_Status.a4d" that would
generate a rowset and batch based on a passed $status.
I remember something about setting a local variable name by some form
of indirection. I pass a $status of "on_hold" and generate a variable
"batch_[on_hold]", qry_PO[on_hold]". and "bst_[on_hold]. Where
[status] represents the dynamic creation of a variable based on the
passed status. Almost remember something like this in dbase2.
something like
//qry_PO_By_Status
$status := $attributes{"status")
query([po];[po]custeomerID = $attributes{"cid");*)
query([po];&;[po]status = $status)
$map :="""
stuff
"""
$batch_[status] := Batch.new(records in selection([po]); 15;num
($attributes{"bst_[status]"}))
$qryPO_[status]:= RowSet.newFromSelection(->[PO]; $map;$batch_[status])
If I have six statuses, I don;t really want to create six scripts if
one can do.
Steve Alex
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/