posted 17 years ago
i have a grid in which data are coming by forming this query
HSQL query = select InvTxn.ivStr2,InvTxn.ivAttdtls,trunc(current_date()-InvTxn.ivDuedate),InvTxn.cstHdr.csName,InvTxn.comp_id.ivId,InvTxn.comp_id.ivDate,InvTxn.ivDuedate,InvTxn.ivTlamt,InvTxn.accrTxn.arOutamt,InvTxn.cstHdr.csPayr,CmtsLog.cmAction,CmtsLog.cmText,InvTxn.ivCurr,StsLog.stsHdr.stName,InvTxn.cstHdr.csId from InvTxn as InvTxn LEFT JOIN InvTxn.stsLogs as StsLog LEFT JOIN InvTxn.cmtsLogs as CmtsLog where InvTxn.enttyHdr.enId IN (4) and InvTxn.ivClosed = 0 order by InvTxn.cstHdr.csId,InvTxn.ivDuedate
I m firing this query on my InvTxn Table.now when i select(using check box) a invoice from grid and attach a file then that ivid and ivdate and url saves into my another table called Attmts_log,also in my attachment panel i have a check box if it selects at the time of attachment then flag will be saved as 1 for that invoice id in attmts_log table and if it deselects then it saves as 0 in attmts_log or if i wont attache any file for any invoice flag vaue is neither 0 nor 1.
Now i want all the records that are coming from my above query and if for any invoice,flag finds 1 i want the url of the attchaed file.if it doesn't find 1 or if it finds 0 or nothing..i dont want the url but the entire record from above query should be appear..
If further confussion please let me know.
Thanks