Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6

Type Description Date Characterization
LINKS.txt 26/9/2017 LINKS.txt Document Type 1
test.pdf 8/3/2018 test.pdf
my remotes.txt 8/3/2018 my remotes.txt
my remotes.txt 9/3/2018 my remotes.txt
id_photo.jpg 18/10/2018 id_photo.jpg
20/6/2019
A4envelope.jpg 12/10/2019 A4envelope.jpg
A4envelope.jpg 12/10/2019 A4envelope.jpg
Mykosmos.docx 12/10/2019 Mykosmos.docx
ForTheOwner.docx 12/10/2019 ForTheOwner.docx
107:1-60

Title : Attached Documents

Toolbars

call edit()
call edit_doc()
call unrelate()
call BrowseFilter()
call PrintGrid()
call CreateSheet()

Buttons

Fields



AutoScript

lib

proc Form_Start()

     cap = GetMessage("Attached Documents")
     call SetCaption(cap)

end

proc Panels_Start( form )

     start_sql "DATA" "KOSMOS"
        SELECT AU_DOC.*, AU_DOC_REL.RELDATE AS RELDATE, AU_DOC_REL.AU_DOC_REL, AU_DOC_REL.RTYPE,
        AU_DOC_RELTYPE2.AU_DOC_RELTYPE2_D, AU_DOC_REL.REL_TABLE_NAME
        FROM (AU_DOC_REL LEFT JOIN AU_DOC ON AU_DOC_REL.AU_DOC = AU_DOC.AU_DOC)
        LEFT JOIN AU_DOC_RELTYPE2 ON AU_DOC.AU_DOC_RELTYPE2 = AU_DOC_RELTYPE2.AU_DOC_RELTYPE2
        WHERE (((AU_DOC_REL.REL_TABLE_NAME)=:T) AND ((AU_DOC_REL.REL_REC_ID)=:R))
        ORDER BY AU_DOC_REL.RELDATE
     end_sql
     q = QueryByName("DATA")
     call TSetParam(q,"T",__params[4])
     call TSetParam(q,"R",__params[5])
     call TPrepare(q)

end

{================================= Lst_DblClick =============================}

proc Lst_DblClick()

       doc = TGetFld(q,"AU_DOC")
       islink = TGetFld(q,"ISLINK")
       file = TGetFld(q,"FILE_NAME")
       command = TGetFld(q,"OPENCOMMAND")

       if (islink = 1) then
         call Browse(file)
       else
         call DocView(doc,"",command)
       endif

end

proc edit()

     rel_id = TGetFld(q,"AU_DOC_REL")
     str = strcat(rel_id,"=AU_DOC_REL")
     call OpenFormTop("ptEdit","AU_DOC_REL_E.FM","WORK.AU_DOC_REL",1,str)

end

proc edit_doc()

     doc_id = TGetFld(q,"AU_DOC")
     str = strcat(doc_id,"=AU_DOC")
     call OpenFormTOP("ptEdit","AU_DOC_E0.FM","WORK.AU_DOC",1,str,"ALL_MODE")
end

{===================================== unrelate ========================================}

proc unrelate()

     f = TopForm()

     file     = TGetFld(q,"FILE_NAME")

     flag = message_yes_no("Να απομακρυνθεί το έγγραφο ",file,";")

     if(flag = 1) then

        fprev = PreviousForm(f)
        rdoc = getfprevfield("AU_DOC_REL")
        call DocUnRelate(rdoc)
        call message("The document was deattached!")
        call Refresh(f)
        call ShowAll(fprev)

     endif

end