ill explain my set up first,
parent table - casefile. child table - Track.
in track a record is added called 'File Check' (this is done auto and only one file check can exist per parent)
here is the code to add the file check (may help with my question). this action is fired if certain fields are not completed (they may be completed later but must be completed before the record is considered complete)
when the fields that were previously not complete are now completed i need to update the record to show as done. I was going to build a form, filter the record, mark the relevant field as .T. then close the form, but this is messy.
the problem i am having is just the filter, i need to filter caseref (this will be on the parent and child table as the linking field) and the record in track which has the words 'file check' for this particular parent record.
here is my attempt at the code so far.
its not working for me, i have tried a few things before posting.
parent table - casefile. child table - Track.
in track a record is added called 'File Check' (this is done auto and only one file check can exist per parent)
here is the code to add the file check (may help with my question). this action is fired if certain fields are not completed (they may be completed later but must be completed before the record is considered complete)
Code:
dim tbl as P dim vcref as c dim vclient as c tbl = table.open("track") tbl.enter_begin(.T.) tbl.Task_user=casefile->Adviser tbl.Task_by="Compliance" tbl.Task_due=date() tbl.Task_group="File Check" tbl.Caseref=casefile->caseref tbl.Ask_client=calc->cclient1 tbl.enter_end(.T.) tbl.close()
the problem i am having is just the filter, i need to filter caseref (this will be on the parent and child table as the linking field) and the record in track which has the words 'file check' for this particular parent record.
here is my attempt at the code so far.
Code:
dim tbl as P dim track as c dim caseref as c tbl = table.open("track") tbl.change_begin(.T.) track= "tbl.Task_group="File Check"" caseref = casefile->caseref [COLOR="Red"]or could be track->caseref[/COLOR] query.filter ="("+track+") .and. ("+caseref +")" tbl.Task_done=.t. tbl.change_end(.T.) tbl.close()
Comment