A question to Denes Kubicek (Repeating Calendar)

Hi Denes!
I've an issue with the calendar function you've posted on the blog...I was using it preety much and it was working fine until I've modified it with some if clauses...
It looks like this now...
create or replace FUNCTION return_table_fn
RETURN session_table_type
AS
v_data session_table_type := session_table_type ();
v_cnt NUMBER DEFAULT 0;
v_date DATE;
v_days NUMBER;
v_count1 NUMBER := 1;
v_count2 NUMBER := 1;
BEGIN
FOR c IN (select
EMPLOYEE_ID,
CUSTOMER_ID,
SERVICE_ID,
START_DATE,
END_DATE,
DAY_START_HOUR,
DAY_END_HOUR,
CYCLIC,
WITH_SATURDAY,
WITH_SUNDAY,
CALL_PRIORITY,
WITH_HOLIDAY
from WORKSHOP.PMS_SCHEDULE)
LOOP
v_days := c.END_DATE + 1 - c.START_DATE;
FOR i IN v_count1 .. v_days + (v_count1 - 1)
LOOP
v_date := (c.START_DATE - 1) + v_count2;
IF TO_CHAR((v_date),'fmD') < 6 THEN
v_data.EXTEND;
v_data (v_data.COUNT) := session_rectype (v_date, c.EMPLOYEE_ID,c.CUSTOMER_ID,c.SERVICE_ID,c.DAY_START_HOUR,c.DAY_END_HOUR,c.CYCLIC,c.WITH_SATURDAY,c.WITH_SUNDAY,c.WITH_HOLIDAY,c.CALL_PRIORITY);
ELSIF c.WITH_SATURDAY = 'Y' and TO_CHAR((v_date),'fmD') = 6 THEN
v_data.EXTEND;
v_data (v_data.COUNT) := session_rectype (v_date, c.EMPLOYEE_ID,c.CUSTOMER_ID,c.SERVICE_ID,c.DAY_START_HOUR,c.DAY_END_HOUR,c.CYCLIC,c.WITH_SATURDAY,c.WITH_SUNDAY,c.WITH_HOLIDAY,c.CALL_PRIORITY);
ELSIF c.WITH_SUNDAY = 'Y' and TO_CHAR((v_date),'fmD') = 7 THEN
v_data.EXTEND;
v_data (v_data.COUNT) := session_rectype (v_date, c.EMPLOYEE_ID,c.CUSTOMER_ID,c.SERVICE_ID,c.DAY_START_HOUR,c.DAY_END_HOUR,c.CYCLIC,c.WITH_SATURDAY,c.WITH_SUNDAY,c.WITH_HOLIDAY,c.CALL_PRIORITY);
END IF;
v_count1 := v_count1 + 1;
v_count2 := v_count2 + 1;
END LOOP;
v_count2 := 1;
END LOOP;
RETURN v_data;
END;
My point for the code was not to show sunday or saturdays...but it doesnt show fridays...its very weird..if i delete the if clauses then calendar works preety fine again...
Do you maybe by any chance know why ??
With regards,
PsmakR

Thank you Denes for y our quick reply...unfortunately it doesnt work for me...
I work on SQL Develoepr and when I type there ALTER SESSION... my calendar still dont show fridays...If I add ALTER SESSION.. in to the function my calendar is not showing anythiing at all ..there is an error - Cannot perform DML and so on..
To your information in POLISH nls saturday and sunday is 6th and 7th day of week...
Maybe I'll paste you also my calendar query:
SELECT
session_date,
TO_CHAR((SESSION_DATE),'fmD') day,
employee_id,
(SELECT SURNAME || ', ' || FIRST_NAME from PMS_EMPLOYEES) EMPLOYEE,
customer_id,
(SELECT CUSTOMER_NAME FROM PMS_CUSTOMERS) CUSTOMER,
service_id,
(SELECT SERVICE_NAME FROM PMS_SERVICES) SERVICE,
(SELECT (EXTRACT(HOUR FROM DAY_END_HOUR) - EXTRACT(HOUR FROM DAY_START_HOUR)) from PMS_SCHEDULE) HOURS,
cyclic,
with_saturday,
with_sunday,
call_priority PRIORITY,
with_holiday
FROM TABLE (SELECT return_table_fn () AS session_table_type
FROM DUAL)
Maybe you have some other ideas ??
With regards,
PsmakR

Similar Messages

  • Multiple Reports In One Region - Question For Denes Kubicek

    Denes,
    I looked at what you've done on your demo app 31517, Page 152
    (http://htmldb.oracle.com/pls/otn/f?p=31517:152), in which you place several reports in the same region. It is nicely done and a great example of something I
    need to do at my work place.
    I have two questions.
    1) In your explanation link (takes me to your blog) you say you made changes to a copy of the Report Template and placed this copy into a copy of the Standard Page Template. However, I see that your reports are set to "No Template".
    I've probably missed something here, but don't know what.
    2) A more general question ... I'm intrigued in how you get tab item in, say, your Section 4 Tab Set (or any of the other Tab Sets) to "Stand Out" in bold letters
    when clicked on. How are you doing this?
    Thanks very much for your help. Yours is one of the great sites to learn from.
    Elie

    Apex v4. has parent and child regions (subregions) where child regions display inside the parent. If you make the child regions with no template, they will probably appear as if it's just two reports in one region.
    Problem is, they display one above the other, not side by side. But there's been a recent thread on working around this just in the past few days on this forum.

  • ICloud syncs duplicating repeating calendar events on iPhone and iPad

    Repeating calendar events are being duplicated on iPhone and iPad when synced with iCloud. I now have 32 valentines day entries! Please help. Just using the iPhone and iPad, no computer.

    go to icloud.com and manage your account. delete the other calendars you have, set you default cals

  • Why would a repeating Calendar event display on both my Macs and my iPhone, but not on my iPad?

    I have accepted a repeating Calendar event invitation. It displays on both my office and home Macs and on my iPhone, but it doesn't show up on my iPad. I've checked to ensure that the proper Calendar is displaying on the iPad, and all of my other events seem to be displaying just fine. I'm stumped by this one!

    Welcome to the Support Communities. The answer is that Adobe's Flash Player is an unsupported product on mobile devices such as iPad. In Adobe's own words: 
    "We will no longer continue to develop Flash Player in the browser to work with new mobile device configurations (chipset, browser, OS version, etc.) following the upcoming release of Flash Player 11.1 for Android and BlackBerry PlayBook." (Source)

  • My question concerns the ipad monthly calendar view.

    My question concerns the ipad monthly calendar view.  An all day event spans two days in the monthly calendar view.  Is this a bug?

    The entry is correct in day and week view.  In the month view, the event carries to the next day indicating it ends at 12:00am.

  • Ajax Autocomplete (Denes Kubicek)

    Hi,
    I am using Denes Kubicek examples for Ajax Autocomplete:
    http://htmldb.oracle.com/pls/otn/f?p=31517:53:2727115168911885::NO
    The example works great for one text field, but I am trying to see if it works for two text fields.
    I added this to the region footer.
    <script language="javascript" type="text/javascript">
    <!--
    register("P3_ENAME", "EMP", "ENAME", "blue", "red");
    register("P3_DEPT", "DEPT", "DNAME", "blue", "red");
    //-->
    </script>
    But that didn't work.
    Can this be done?
    Thanks
    VC

    Hi Denes,
    Forget my previous post.
    Here is the javascript code I placed in the Page Header:
    <script language="JavaScript" type="text/javascript">function f_register(p_this){
              var p_this_name = $x(p_this).id;                    
              //alert(p_this_name);                    
              if (p_this_name == 'P3_ENAME')                         
              alert(p_this_name);                         
              register("P3_ENAME", "EMP", "ENAME", "blue", "red");
              else { register("P3_DEPT", "DEPT", "DNAME", "blue", "red");
    }</script>I can't enter any data in the text field with the onFocus element.
    Not sure what I am doing wrong.

  • Subsequent to Yosemite or updates, my repeating calendar events can not be updated as before. When I update an event (of the repeating event) on my MacBook Pro; its reverts back when I shut it down and come back, and doesn't update other devices?

    Subsequent to Yosemite or updates, my repeating calendar events can not be updated as before. When I update an event (of a repeating event) on my MacBook Pro; its reverts back when I shut it down and come back, and doesn't update other devices?
    Has anyone experienced this and does anyone know a fix?

    This is incredibly frustrating for me too!
    I have a repeated monthly event for a discount at a store that is offered on the first Tuesday of every month. So I have a repeated event taking place on the 1st of every month. In the previous month I reset next month's date from the 1st to whatever date falls on the first Tuesday.
    But ever since upgrading to Yosemite, I am experiencing the same problem as the original person who posted. The date saves on my calendar but does not sync to my iCloud. When I reboot the computer, the date reverts back to the 1st.
    I'm thankful I don't have any events that needed to be tracked because ALL of my previous changes in the past have reverted back to the 1st of the month. I would have been in the same terrible situation as yaz999 in having to manually change every event in previous months.
    Why hasn't this bug been fixed yet???!!!

  • JavaScript Show Hide Items (Shuttle) (Denes Kubicek)

    Hello
    I was looking at a great example from Denes Kubicek on this link (http://htmldb.oracle.com/pls/otn/f?p=31517:129:495210338999346::NO:::) Guest Apex_demo and have managed to get it to work.
    However, I would like to show/hide a shuttle item. Any ideas how I could achieve this? It only seems to hide the selected values part of the shuttle and not the buttons/LOV.
    Thank you in advance

    Hello,
    In case of a shuttle item you need to use a label with ID, and use that ID as the parameter to the $x_HideItemRow() or $x_ShowItemRow().
    The following post describe how to create a proper template for that purpose: Re: Hide and show item as per the value of select list .
    Regards,
    Arie.

  • File Mass upload (Denes Kubicek?) - Need help to find my schema

    Hi,
    I've been looking at the excellent example on Denes Kubicek site on how to Mass file upload (http://htmldb.oracle.com/pls/otn/f?p=31517:218).
    I'm not sure how to complete the first part of this example
    EXEC dbms_java.grant_permission( 'YOUR_SCHEMA', 'java.io.FilePermission','d:\datapump','read' ); How do I find my schema that this needs to be grants. I installed XE and upgraded it to APEX 3.1.1.00.09.
    I've opened SQL plus and typed: conn sys as sysdba and then entered in the password and it connect. I'm a bit confused on how to find my schema. The rest of it seems to be quiet self explanatory.
    Many Thanks and Happy New Year to all.

    Hi Denes,
    Thanks I logging into the "Internal" workspace and went to Home>Manage Workspaces>Manage Workspace to Schema Assignments. I see my workspace "BILLY" is assigned to schema "BILLY".
    So I logged into sqlplus using "conn sys as sysdba" and entered in the following:
    exec dbma_java.grant_permission('BILLY','java.io.FilePermission','d:\WebPix','read');I then get
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identier 'DBMA_JAVA.GRANT_PERMISSION' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredAny ideas why this maybe failing?
    Also would this be a valid directory string 'd:\My Pictures\Website' or should this be the string 'd:\My_Pictures\Website' ?
    Thanks for your help.

  • Need help in completing Denes Kubicek code: cascading lov in tabular form

    Hi, I have been working off of Denes Kubicek demo for cascading lovs and have finally (!) gotten it working....sort of.
    Denes's instructions indicate that you must request an account in order to receive the code. I have done so, but have not had a response....can anyone help me on what needs to be done in oder to complete his instructions?
    thanks!!
    here is his helpful code:
    http://htmldb.oracle.com/pls/otn/f?p=31517:176:2537143614094776

    sorry. my query is now:
    select
    apex_item.hidden(11,seq_id) seq,
    apex_item.hidden (12,seq_id)||
    apex_item.select_list_from_query_XL(13,c013,'select distinct s.common_name d, s.species_itis r
    from species s, species_qc c
    where partner_id = '||:f200_issuing_agency||' and
    c.species_itis = s.species_itis order by s.common_name',
    'style="width:220px" '
    || 'onchange="f_set_casc_sel_list_item(this,'
    || 'f16_'
    || LPAD (seq_id, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select Species -',
    'f13_' || LPAD (seq_id,4, '0'),
    NULL,
    'NO'
    ) SPECIES_ITIS,
    apex_item.select_list_from_query(14,c014,'select disposition_desc d, disposition_code r
    from dispositions
    where displayed = 1 order by disposition_desc') DISPOSITION_CODE,
    apex_item.text(15,c015) reported_quantity,
    apex_item.select_list_from_query(16,c016,'SELECT DISTINCT unit_desc ,unit_of_measure
    FROM species_Qc s, units_of_measure u
    WHERE s.unit_of_measure = u.unit_measure
    AND species_itis = '||c013||'AND partner_id = '||:F200_ISSUING_AGENCY,
    'style="width:220px"',
    'YES',
    '0',
    '- Select Unit -',
    'f13_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) UNIT_MEASURE,
    apex_item.SELECT_LIST_FROM_LOV(17,c017,'SALE_DISPOSITION') SALE_DISPOSITION_FLAG,
    apex_item.text(18,c018) PRICE,
    apex_item.text(19,c019) PERMIT_ID,
    apex_item.select_list_from_query(20,c020,'select market_desc d, market_code r
    FROM market_categories
    where market_code in (select distinct market_code
    from species_qc
    where species_itis = '||c013||'
    and partner_id = '||:F200_ISSUING_AGENCY||')',
    'style="width:220px"',
    'YES',
    '0',
    '- Select Market -',
    'f13_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) MARKET_CODE,
    apex_item.text(21,c021) GRADE_CODE,
    apex_item.text(22,c022) trip_id
    from apex_collections c
    where collection_name = 'CATCH_C' and
    c.c022 = :F200_CURRENT_TRIP_ID
    UNION ALL
    select
    apex_item.hidden(11,null) seq,
    apex_item.hidden (12,null)||
    apex_item.select_list_from_query_XL(13,0,'select distinct s.common_name d, s.species_itis r
    from species s, species_qc c
    where partner_id = '||:f200_issuing_agency||' and
    c.species_itis = s.species_itis order by s.common_name',
    'style="width:220px" '
    || 'onchange="f_set_casc_sel_list_item(this,'
    || 'f16_'
    || LPAD (9900 + LEVEL, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select Species -',
    'f13_' || LPAD (9900 + LEVEL,4, '0'),
    NULL,
    'NO'
    ) SPECIES_ITIS,
    apex_item.select_list_from_query(14,null,'select disposition_desc d, disposition_code r
    from dispositions
    where displayed = 1 order by disposition_desc') DISPOSITION_CODE,
    apex_item.text(15,null) reported_quantity,
    apex_item.select_list_from_query(16,null,'SELECT DISTINCT unit_desc ,unit_of_measure
    FROM species_Qc s, units_of_measure u
    WHERE s.unit_of_measure = u.unit_measure
    AND species_itis = '||0||'AND partner_id = '||:F200_ISSUING_AGENCY,
    'style="width:220px"',
    'YES',
    '0',
    '- Select Unit -',
    'f13_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO' ) UNIT_MEASURE,
    apex_item.SELECT_LIST_FROM_LOV(17,null,'SALE_DISPOSITION') SALE_DISPOSITION_FLAG,
    apex_item.text(18,null) PRICE,
    apex_item.text(19,null) PERMIT_ID,
    apex_item.select_list_from_query(20,null,'select market_desc d, market_code r
    FROM market_categories
    where market_code in (select distinct market_code
    from species_qc
    where species_itis = '||0||'
    and partner_id = '||:F200_ISSUING_AGENCY||')',
    'style="width:220px"',
    'YES',
    '0',
    '- Select Market -',
    'f13_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO' ) MARKET_CODE,
    apex_item.text(21,null) GRADE_CODE,
    apex_item.text(22,null) trip_id
    FROM DUAL
    WHERE :request = 'ADD'
    CONNECT BY LEVEL = 2
    I have two issues:
    1. the item tab_cascading_item is not populated when the value of c013 (species) is changed.
    2. I receive an error when trying to add a row to the collection. My code for doing so is:
    begin
    for i in 1..1 LOOP
    apex_collection.add_member (p_collection_name => 'CATCH_C',
    p_c013 => null,
    p_c014 => null,
    p_c015 => null,
    p_c016 => null,
    p_c017 => null,
    p_c018 => null,
    p_c019 => null,
    p_c020 => null,
    p_c021 => null,
    p_c022 => :F200_CURRENT_TRIP_ID );
    end loop;
    end;
    I am so close on getting this....any help would be appreciated.

  • Repeated calendar entries on iOS 5

    Can anyone tell me how to stop repeated calendar entries on my iOS devices? Today, for instance, I have over 40 entries telling me that today is Batttle of the Boyne day in Ireland!  It's getting really annoying and I am syncing just the 1 calendar with iCloud.  Can anyone help?

    Can anyone tell me how to stop repeated calendar entries on my iOS devices? Today, for instance, I have over 40 entries telling me that today is Batttle of the Boyne day in Ireland!  It's getting really annoying and I am syncing just the 1 calendar with iCloud.  Can anyone help?

  • Error when running  Denes Kubicek auto complete

    First off, Denes is a genius for creating this site: http://apex.oracle.com/pls/otn/f?p=31517:53:2299218646945201::NO:RP:: This is by far the best Application Express site I've ever seen.
    Second, I'm having an issue with the Ajax Autocomplete (which is like the most awesome thing I've ever seen). Currently I'm running the 10g version so I'm not sure if that is causing the issue or what.
    When I click on the search box and type something in, I'm getting the following error returned in firefox. The list is also empty. If I click on the list, I get the second error.
    Error: html_GetElement(p_TextFieldName).parentNode is undefined
    Source File: http://www.internalwebsite.com/s_htmldb/phap/wwv_flow_file_mgr.get_file?p_security_group_id=625114739298344&p_flow_id=217&p_fname=textfield_autofilter.js
    Line: 20
    Error: pColor is undefined
    Source File: http://www.internalwebsite.com/s_htmldb/phap/wwv_flow_file_mgr.get_file?p_security_group_id=625114739298344&p_flow_id=217&p_fname=textfield_autofilter.js
    Line: 111
    Thank you for any suggestions anyone has.

    The instruction says:
    In the footer of the region where your search item
    is placed, enter the following:
    <script language="javascript" type="text/javascript">
    <!--
    register("P53_ENAME", "EMP", "ENAME", "blue", "red");
    //-->
    </script>
    My assumption is that some of the five parameters of the register function is not matching to whatever they should. You need to have those
    five and the item, table and column names have to match to the existing item, table and column. Also, blue and red are colors. The color your specified needs to be a valid color. Check your sintax.
    Thanks for calling me a genious but I am definitelly not one. The site you praise (once again thanks) is primarily a lot of work.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Is there a way to sequentially number repeating calendar events

    Is there a way to sequentially number repeating calendar events?
    For example: I have fitness training 3x a week, every Tue, Thu & Sat. I  set it up as a repeating event in calendar, but would like it to nimber each event. o if I looked at the last day on the calendar, there would have been noted somewhere that this was occurence #12 Currently, I would have to go ahead into each event & edit in what # it was. Any help or suggestions  would be appreciated. Thanks!

    I don't believe that there any automatic way to do this in the Calendar App.

  • Repeat calendar entries in ical

    Hi All
    thanks in advance for any help anyone can offer on this fairly fundamental question...
    We are running i cal on a G5 quad, an imac and our two iphones (via moblie me), whenever one of the main computers syncs ical we get repeated diary entries,
    ie, if there is an entry in the 'home' diary, it ends up being repeated every time the g5 syncs its calendar, this repeated entry then appears on the imac and the iphones...
    any advice?
    how might i make the imac the master diary and make the g5 and the i phones sync to it...?
    thanks!
    sam

    You can stop this from occurring by going into the info tab in iTunes and unchecking everything. If you are syncing with mobileMe and those are checked. It will double all of your entries.

  • BlackBerry OS6: Repeating Calendar Events Broken?

    Hi everyone,
    I have been experiencing the strangest issue when trying to add a calendar event in BlackBerry OS6, and I was wondering if anyone knew of a good way to work around this issue.
    Basically, the problem happens when trying to book a repeating event at a time where the current GMT time differs from the current local time. For example, I am trying to book an event that happens every week at 10 pm edt on a tuesday, but BlackBerry 6 ends up booking the event every week at 10 pm EDT the Wednesday instead, presumably because the GMT date does indeed occur on the Wednesday. When I tried to set it to repeat on the Tuesday, it ended up repeating on both the Tuesday and Wednesday, leaving me out of further options.
    Has anyone experienced this issue, and if so, are there any good work-arounds My current solution is to have my event say it is on Monday so that it books on Tuesday, but this is undesirable because it is displaying Monday when you view the event series.

    Hi Kim,
    Good question. That .plist file is just a place where iCal keeps track of your preference settings. Sometimes that file gets corrupted and cause all sorts of strange behavior. Deleting the preferences is just a first thing to try when experiencing strange behavior. In iCal, resetting the preferences isn't a big deal. In some programs there are many layers of preferences so you might want to think twice before deleting, or at least write down all the preferences before doing so.
    Whether or not you need to delete depends on your problem (assuming you're having one). Are you? If so you might want to describe the problem here but it won't hurt to delete the preferences; you'll just need to reset them if you want anything set other than the default (eg I have time Zone support checked).

Maybe you are looking for