×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Generating HTML for a search

Generating HTML for a search

Generating HTML for a search

(OP)
I want to have a url generated based on a text box criteria outwith ECM.

So my front end will have a button which will when clicked open up a url that runs a search in a specific folder (01+Training+Records) for the criteria in a combo box (in the case below 7667)

A standard search generates this

http://myecmserrver.co.uk/otcs/cs.exe?slice=158487...7667&ScopeSelection=1584878%7C139957%7CWithin+01+Training+Records&context_id1=none&lookfor1=allwords&modifier1=relatedto&boolean2=And&lookfor2=complexquery&typeDropDownId=1&boolean3=And&lookfor3=complexquery&dateDropDownId=1&func=search&objType=258&SearchBarSearch=TRUE&location_id1=139957&facets=user&fulltextMode=allwords

And I guess I could substitute 7667 for something else but it's a little inelegant to say the least and there must be a shorter URl

Thanks v much in advance

RE: Generating HTML for a search

why can't you use POST for that
http://www.tek-tips.com/faqs.cfm?fid=3552

behind the scens all you want could be in html "hidden" controls and the button would do a POST

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair
http://www.livelink.in

RE: Generating HTML for a search

(OP)
Most because I don't know how to implement that in VBA.

This will be a bunch or rows in either excel or access
Each row will have A docname in it which will appears as a hyperlink
The hyperlink will be generated one per record and use the docname as the search criteria.
Clicking that will then open IE and run the search for the document name as I have no way of linking excel/access directly to the document in ECM.
It's totally do-able outside of ECM if I stored the docs in a regular FS, but not ECM.





RE: Generating HTML for a search

we have Excel VBA Macros for searching in LL see example.Our target URL is kept in a Excel cell against a slice in livelink so the URL is much shorter
I doubt if you need all those you have typically ?func=search is what invokes the searchAPI and all those things are documented in the search API
docu

CODE -->

Sub Find_Documents()

    Dim i As Integer, tmpstr As String, document_num As String, ll_url As String
    Dim cnt As Integer
                    
    cnt = 0
    i = 1
    tmpstr = ""
    Range("C9").Select
            
    Do While ActiveCell.Value <> ""
        
        document_num = ActiveCell.Value
        
        tmpstr = tmpstr & "&where" & i & "=Attr_13006_19:" & document_num
        tmpstr = tmpstr & "&lookfor" & i & "=complexquery"
        
        If i >= 10 Then
            ll_url = Range("LLSearchURL").Value & tmpstr
    
            ActiveWorkbook.FollowHyperlink Address:=ll_url, NewWindow:=True
            
            i = 0
            tmpstr = ""

            If MsgBox("Searching 10 Items, click <OK> to seach more", vbOKCancel, "Search Controls") = vbCancel Then
                Exit Do
            End If
                
        End If
        
        ActiveCell.Offset(1, 0).Select
        
        i = i + 1
        cnt = cnt + 1
    
    Loop
    
    If tmpstr <> "" Then
        ll_url = Range("LLSearchURL").Value & tmpstr
    
        ActiveWorkbook.FollowHyperlink Address:=ll_url, NewWindow:=True
    End If
    
End Sub 

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair
http://www.livelink.in

RE: Generating HTML for a search

(OP)
Hmm, not seeingho that works
However It's pointed me in the right direct

I've a cell with

=HYPERLINK("http://myecmserver.co.uk/otcs/cs.exe?func=search&a...="&A4,"Find this")

What would be even nicer would be getting that document rather than it opening a search (it will always only find one document) and then having to open it that way.
However I'm not sure that can even be done.

RE: Generating HTML for a search

(OP)

CODE -->

=HYPERLINK("http://myecmserver.co.uk/otcs/cs.exe?func=search&lookfor1=complexquery&where1="&A4,"Find this") 

RE: Generating HTML for a search

If there is always a one to one mapping, then you may be better going to the OT database rather than via Search to generate the link ?

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

RE: Generating HTML for a search

(OP)
Well I'd be interested in an example.

RE: Generating HTML for a search

Assuming that you have a definite 1:1 mapping between the file name and the system you can connect to the OT DB and look in the DTREE table as that stores the name and unique id.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

RE: Generating HTML for a search

(OP)
I understand, you mean run a search for the Filename and pull the doc ID, and then use a link direct to the docID?
I don't know how to link directly to the document - say to open it as a PDF (it'll always be a pdf)
Fetch isn't working and all other attempts are producing bad syntax - it appears to be looking for a function?

RE: Generating HTML for a search

yes, something like :

SELECT * FROM table WHERE file_name = "<x>"

you can get the specific SQL from the OT DB Schema document via an NDA, although if you have a lot of documents, a single query using an IN clause for the name and then using VBA to process the resultset and create the links may be better. Link would be something like ?func=ll&objid=1234&objaction=properties to get the properties page.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

RE: Generating HTML for a search

Greg if SSO is active then he can just create a Live Report and call that from the VBA code that way his client code need not be concerned with securing a DB connection and it will also be permission aware
as a quick example go to your personal ->Reports->Live Reports Volume therein you will see many canned Live Reports that is the one I am talking about.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair
http://www.livelink.in

RE: Generating HTML for a search

@AppNair, sounds better than the search and has the Filter Permissions option that you mention as well.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close