robert fuschetto Posted November 29, 2021 Share Posted November 29, 2021 Instead of a WF Portal tab being associated to an HTML page can it simply open a document when selected I may want a user to click a tab but have it open say a WORD doc I know this sounds odd but may benefit us. Can this be done Link to comment Share on other sites More sharing options...
Martin Yergeau Posted November 29, 2021 Share Posted November 29, 2021 Using the same code as I already provides you in your other discussion You create a fex that you will then insert in the tab. And when you click on that tab, the fex is executed and the document is open. -* ---------------------------------------- -* File: IBFS:/WFC/Repository/Public/OpenPDF_Doc.fex -* ---------------------------------------- -DEFAULTH &DOC_NAME = 'Glossary' -SET &WF_ENV = LOWER(TRIM_(BOTH, ' ', FGETENV(30,'COMPUTERNAME', 30,'A30'))); -*-* To access pdf documentation, there is an IIS virtual directory (InfoDoc) that point to E:InfoDoc -SET FILE_PATH = 'http://' || &WF_ENV || '/InfoDoc/'; -SET &FILE_NAME = &DOC_NAME || '_&LANG.EVAL.pdf'; -HTMLFORM BEGIN <html> <head> <meta http-equiv="refresh" content="0; url=!IBI.AMP.#FILE_PATH;!IBI.AMP.FILE_NAME;"> </head> </html> -HTMLFORM END Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 29, 2021 Author Share Posted November 29, 2021 Sorry Martin, I will try this. Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 29, 2021 Author Share Posted November 29, 2021 Martin, I was given this as he path. I added it to an HTML Form in a hyperlinkit works: http://lvhsharepoint4/sites/LVPG/Doc/Step%201%20-%20Pick%20Up-Rpt%20Business%20Plans/TEST/TestPortalXdriveLinks.docx Is there syntax that I can pop this intoas in your example I am not familiarperhaps your code can reference this -HTMLFORM BEGIN -HTMLFORM END Link to comment Share on other sites More sharing options...
Martin Yergeau Posted November 29, 2021 Share Posted November 29, 2021 Should work -HTMLFORM BEGIN <html> <head> <meta http-equiv="refresh" content="0; url=http://lvhsharepoint4/sites/LVPG/Doc/Step%201%20-%20Pick%20Up-Rpt%20Business%20Plans/TEST/TestPortalXdriveLinks.docx"> </head> </html> -HTMLFORM END Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 29, 2021 Author Share Posted November 29, 2021 If I run the fex above, it indeed opens the file. I Edited my portal, added a tab, dragged the fex onto it. Saved it. When I run the portaland click the new tabnothing happens. So close! Link to comment Share on other sites More sharing options...
Martin Yergeau Posted November 29, 2021 Share Posted November 29, 2021 Even if I have a portal with a page that only have the above fex or a portal with a page that contain a Tab container, I can have the fex displaying the document. From this point its going to be very difficult to help since we cant have access to your portal and edit it. So now you may have other type of issue since you can have the file open by the fex itself. Does the file is in a Virtual directory from IIS as per the other discussion solution Do you have any type of error running the protal (from HTML F12-Debugger or view frame source) Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 29, 2021 Author Share Posted November 29, 2021 and here is where I sort of lose youI am not technical on this stuff. I can turn to IS but they do not use the tooljust support it. (Dont ask!) I can just tell you the Word Doc opens if i run the fex. If I paste the path into our browser it opens. Perhaps I am adding content to the new portal tab incorrectly. It is seldom we add tabs or change content. I added a new tab, then altered its name, then added contentI assume it did correctly since it changed my tab name to the fex name I dragged inthe screen turned white, I save the portal and ran itNothing when I click the new tab name. image.png1916923 100 KB If that looks correct then I am at a loss. Of noteif I stick the fex on an HTML PAGE then this happens: image.png847569 18.3 KB If I then save and run theHTML page the file opens well after you click: OPEN. I thought perhaps when the portal tab was clicked that OPEN prompt page might be in the backgroundbut I do not see it. Finally on the new HTML Page that the portal now calls (no longer pointing to the fex for content)I set the LOAD task to run the fex in a new window. Now when if I click the new portal tab pointed to the new HTML page that loads the doc on openit prompts me to OPEN the doc and works. But I am left with an extraneous HTML page with nothing on it! Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 29, 2021 Author Share Posted November 29, 2021 BTW, the file DOES open in IE!!! Not in EDGE. But we need to be in EDGE. This whole thing is about circumventing EDGE security by opening a Word doc that has links to share filesI have another thread on thisthe trick is opening the file through SharePoint. FYI - I CAN have a link on our HTM page, that opens the Word Doc residing on SharePointI want to save theuser a click and just have WF Portal tab, directly open the file that resides on the SharePoint siteI need to make this more seemless,Oh well Link to comment Share on other sites More sharing options...
Brian Suter Posted November 29, 2021 Share Posted November 29, 2021 Did you try a URL Standard report and put that into a portal page But you may have another issue - putting a doc file in an iframe may not work well. It may want its own window (just like an XLSX file). Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 29, 2021 Author Share Posted November 29, 2021 how do I get a url in the portal page Link to comment Share on other sites More sharing options...
Martin Yergeau Posted November 29, 2021 Share Posted November 29, 2021 Robert, I think that your issue is that because you are trying to open a Word file. As stated by Brian, a Word document, such as Excel, need its own window to open reason why you get prompt from the HTML page. Save your Word file as a PDF a point to this file instead. It then should open as a charme. Even in Portal Editor you should see it since the editor is running each fex All the doc that I display from my portal are Word files saved as PDF and I use the PDF to be open by Edge. That need one more step when you have changes to the Word files, but it worth it. Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 29, 2021 Author Share Posted November 29, 2021 I will try thatin fact I just saved it as a PDF and manually opened the PDFthen clicked a link in the PDFhad never tried that beforewell it works except now the user must respond to this: This whole EDGE thing is a PITA! Link to comment Share on other sites More sharing options...
Warren Hinchliffe Posted November 30, 2021 Share Posted November 30, 2021 You could also try using edaget to return the document Link to comment Share on other sites More sharing options...
Martin Yergeau Posted November 30, 2021 Share Posted November 30, 2021 robertf: except now the user must respond to this: Because its an Excel file. It cannot be open directly. It needs to download it and then open in its own window. Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 30, 2021 Author Share Posted November 30, 2021 Waz, Can you elaborate. I feel like I have some bits and pieces, trying to put the puzzle together to make the most seamless user experience. So far, the resolution options to the fact that EDGE will not allow direct access to files stored locally on a share is: See if we can run EDGE in IE mode. IS is looking into this however I suspect this will not be supported by IBI or at best it maybe a hit or miss type thing when it comes to product functionality. I am not sure. Take local content and where file size is small enough (help docs, notices, directions etc), move to Sharepoint. Then repoint the HTML hyperlinks to SharePoint. For larger files (Excel Pivots, PowerPIvots etc), leave on their local share. Create a PDF with links to these files. Save PDF to SharePoint. Link to the PDF via a WF Portal Tab that opens the PDF. The user then selects the report but must down load itanother step. I really hope MS comes up with something better, I understand there is some sort of security issue but our local share was secured to certain users already. Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 30, 2021 Author Share Posted November 30, 2021 All, I just implemented all this in #2 above. I called my NEW tab: Reporting. It was not too bad an experience EXCEPT once I clicked the: Reporting portal tab that opened the PDF, yes all my content showed and opened with the links provided. However, once I closed the PDF file, went to ANOTHER WF portal tab, say: Dashboards, then went back to the: Reporting Tab, it failed to reopen the PDF file. I have no idea why. Sadly I suspect access to these reports will require the user to go to the: Reporting tab, where they must then click another link to the PDFat least that seemed to work last week. Not sure why repeated clicking of the Reporting tab does not run the fex that reopens the PDF each time. Martin, before I give up, so you think there is something on the code It looks like it should work. Link to comment Share on other sites More sharing options...
Martin Yergeau Posted November 30, 2021 Share Posted November 30, 2021 For new browsers everything is outside your company; meaning that is like nothing is read from your network. So, even it everything is secured as Fort Knox, you are still doing an outside request for the browser. Also, take note that IE will not be supported and will not exist anymore within the new Windows 11 that needs to be installed in replacement of Windows 10 in the next 2 years (if I remember well). With Windows 11, no more IE will exist. So, you must not think anymore simulating IE with Edge. As for your PDF that contains all your links and where once closed and click back on the tab it does not open (where I dont have that issue, probably something that you settup differently) : once a tab is clicked, the code is ran and going to another tab to then return does nothing because the browser knows that you already have ran that tab, so it do not refresh it. Instead I suggest that you add an hyperlink in the banner, as per example. That way, each time the link will be clicked, the file will be open. Link to comment Share on other sites More sharing options...
robert fuschetto Posted November 30, 2021 Author Share Posted November 30, 2021 Yeaor we may just add a Hyperlink to our existing Analysis page: Pivot Reports. Its an extra click but so was clicking another tab I guess. THANKS!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now