tag:blogger.com,1999:blog-20567072.post3916725105030488091..comments2024-01-27T11:19:30.468+01:00Comments on Roels Blog: Dynamic 'My Favorites' Links in your APEX ApplicationAnonymoushttp://www.blogger.com/profile/03932233704705635918noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-20567072.post-16772018020489304792009-07-17T10:09:16.732+02:002009-07-17T10:09:16.732+02:00Hi this adaptation will only show pages that are l...Hi this adaptation will only show pages that are linked to from tabs:<br /><br />select htf.anchor( 'f?p='||:APP_ID||':'||page_id||':'||:APP_SESSION, page_name ) Task <br />from (select act.page_name <br /> , act.page_id<br /> , count(*) "load_count"<br /> from APEX_APPLICATION_TABS tab<br /> join APEX_WORKSPACE_ACTIVITY_LOG act on tab.tab_page = act.page_id<br /> where act.application_id = :APP_ID<br /> and act.apex_user = :APP_USER<br /> and act.page_id <> :APP_PAGE_ID<br /> group by act.page_name, act.page_id<br /> order by 3 desc)<br />where rownum <= 10;<br /><br />Greets,<br />Maurice KremerAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-20567072.post-62799570214058641062008-07-02T15:00:00.000+02:002008-07-02T15:00:00.000+02:00Nice collaboration guys! :-)Nice collaboration guys! :-)Stewhttps://www.blogger.com/profile/05177922393895344852noreply@blogger.comtag:blogger.com,1999:blog-20567072.post-69018574288776836992008-07-02T10:14:00.000+02:002008-07-02T10:14:00.000+02:00Excellent Roel.I really like this.One thing I foun...Excellent Roel.<BR/><BR/>I really like this.<BR/><BR/>One thing I found though was that my development team and I use some quite obscure 'Developer' coded page titles (e.g. Developer initials, module reference etc) and the Page Names are set to something more user friendly, after all, the Page Name is what the user sees at the top of their web browser.<BR/><BR/>A join in the query, as shown below, gave us a more user friendly result. Of course, if your page names and titles are the same then you needn't bother.<BR/><BR/>Just my thoughts.<BR/><BR/>As I said, nice post.<BR/><BR/>select htf.anchor( 'f?p='||:APP_ID||':'||page_id||':'||:APP_SESSION<BR/>, page_title ) "Favourite Pages"<BR/>from<BR/>(<BR/>select aap.page_title<BR/>, awal.page_id<BR/>, count(awal.page_id)<BR/>from apex_workspace_activity_log awal<BR/>join APEX_APPLICATION_PAGES aap on aap.application_id = awal.application_id and aap.page_id = awal.page_id<BR/>where awal.application_id = :APP_ID<BR/>and awal.apex_user = :APP_USER<BR/>and awal.page_id <> :APP_PAGE_ID<BR/>group by aap.page_title, awal.page_id<BR/>order by 3 desc<BR/>)<BR/>where rownum <= 3Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20567072.post-11816011193602606282008-07-02T09:21:00.000+02:002008-07-02T09:21:00.000+02:00Todd & Stew,A combination of both suggestions seem...Todd & Stew,<BR/><BR/>A combination of both suggestions seems to result in the best query:<BR/>- use apex_workspace_activity_log instead of the wwv_flow_activity_log (although the apex_.. view only contains data of the last 14 days).<BR/>- I think I don't have to exclude the login page, as there is no known user at the time that page pops up.<BR/>- the ORDER_BY should be inside the inline view, otherwise you don't get the Top-3.<BR/>- use APEX_USER instead of USERID<BR/>- exclude the current page from the query by filtering on :APP_PAGE_ID<BR/><BR/>I updated my post with your suggestions!<BR/><BR/>Thanks,<BR/>RoelRoelhttps://www.blogger.com/profile/07819238980013808276noreply@blogger.comtag:blogger.com,1999:blog-20567072.post-7801065561891742962008-07-01T23:02:00.000+02:002008-07-01T23:02:00.000+02:00Roel,It looks like the better bet would be to use ...Roel,<BR/><BR/>It looks like the better bet would be to use the apex_workspace_activity_log table, since it's already granted to the workspace.<BR/><BR/>I'd use an inner query like:<BR/><BR/>SELECT *<BR/> FROM (SELECT page_id, page_name, MIN(seconds_ago) last_ones<BR/> FROM apex_workspace_activity_log<BR/> WHERE application_id = :APP_ID<BR/> AND page_id <> 101 -- Login page<BR/> AND userid = :APP_USER<BR/> GROUP BY page_id, page_name)<BR/> WHERE rownum <= 3<BR/> ORDER BY 3;<BR/><BR/>Or maybe I'm missing something?Stewhttps://www.blogger.com/profile/05177922393895344852noreply@blogger.comtag:blogger.com,1999:blog-20567072.post-19242548372698165792008-07-01T22:39:00.000+02:002008-07-01T22:39:00.000+02:00For those who were initially as clueless as me whe...For those who were initially as clueless as me when they read "Enable logging on Application Level", that means to navigate to Shared Components -> Application Definition and set Logging := Yes in the Name section.<BR/><BR/>StewStewhttps://www.blogger.com/profile/05177922393895344852noreply@blogger.comtag:blogger.com,1999:blog-20567072.post-75826928216999828472008-07-01T20:29:00.000+02:002008-07-01T20:29:00.000+02:00Nice Post Roel,This can also be done using apex vi...Nice Post Roel,<BR/><BR/>This can also be done using apex view apex_activity_log instead of wwv_flow_activity_log. Using apex_activity_log you would not need steps 1 and 2.<BR/><BR/>Thanks,<BR/>ToddAnonymousnoreply@blogger.com