Missing date function

I need to find next date for specific day (for example Friday, What date will be next Friday)
I want to find out how many specific days are in this year from today (for example Friday, I want to know how many Fridays are in this year from today)
I want to add row for a specific day in a certain period into a collection (for example I want to add each Friday in this year from today a note "XYZ")
Is it possible to add this into siena or is there any solution for that?

I found one solution for finding date for next specific day (for example Friday, What date will be next Friday)
I have added this code into a button OnSelect
If(Text(Today(),"ddd")="Fri", UpdateContext({dateFri: Today()}), UpdateContext({dateFri: DateAdd(Today(),1,Days)})); If(dateFri=DateAdd(Today(),1,Days) && Text(dateFri,"ddd")="Fri", UpdateContext({dateFri:
dateFri}), UpdateContext({dateFri: DateAdd(Today(),2,Days)}));  If(dateFri=DateAdd(Today(),2,Days) && Text(dateFri,"ddd")="Fri", UpdateContext({dateFri: dateFri}), UpdateContext({dateFri: DateAdd(Today(),3,Days)}));  If(dateFri=DateAdd(Today(),3,Days)
&& Text(dateFri,"ddd")="Fri", UpdateContext({dateFri: dateFri}), UpdateContext({dateFri: DateAdd(Today(),4,Days)}));  If(dateFri=DateAdd(Today(),4,Days) && Text(dateFri,"ddd")="Fri", UpdateContext({dateFri:
dateFri}), UpdateContext({dateFri: DateAdd(Today(),5,Days)}));  If(dateFri=DateAdd(Today(),5,Days) && Text(dateFri,"ddd")="Fri", UpdateContext({dateFri: dateFri}), UpdateContext({dateFri: DateAdd(Today(),6,Days)}))
That works good. But the questin is:
Is this code working in other countries where day format for Friday ddd is not Fri ???

Similar Messages

  • How to Get Missing Dates for Each Support Ticket In My Query?

    Hello -
    I'm really baffled as to how to get missing dates for each support ticket in my query.  I did a search for this and found several CTE's however they only provide ways to find missing dates in a date table rather than missing dates for another column
    in a table.  Let me explain a bit further here -
    I have a query which has a list of support tickets for the month of January.  Each support ticket is supposed to be updated daily by a support rep, however that isn't happening so the business wants to know for each ticket which dates have NOT been
    updated.  So, for example, I might have support ticket 44BS which was updated on 2014-01-01, 2014-01-05, 2014-01-07.  Each time the ticket is updated a new row is inserted into the table.  I need a query which will return the missing dates per
    each support ticket.
    I should also add that I DO NOT have any sort of admin nor write permissions to the database...none at all.  My team has tried and they won't give 'em.   So proposing a function or storable solution will not work.  I'm stuck with doing everything
    in a query.
    I'll try and provide some sample data as an example -
    CREATE TABLE #Tickets
    TicketNo VARCHAR(4)
    ,DateUpdated DATE
    INSERT INTO #Tickets VALUES ('44BS', '2014-01-01')
    INSERT INTO #Tickets VALUES ('44BS', '2014-01-05')
    INSERT INTO #Tickets VALUES ('44BS', '2014-01-07')
    INSERT INTO #Tickets VALUES ('32VT', '2014-01-03')
    INSERT INTO #Tickets VALUES ('32VT', '2014-01-09')
    INSERT INTO #Tickets VALUES ('32VT', '2014-01-11')
    So for ticket 44BS, I need to return the missing dates between January 1st and January 5th, again between January 5th and January 7th.  A set-based solution would be best.
    I'm sure this is easier than i'm making it.  However, after playing around for a couple of hours my head hurts and I need sleep.  If anyone can help, you'd be a job-saver :)
    Thanks!!

    CREATE TABLE #Tickets (
    TicketNo VARCHAR(4)
    ,DateUpdated DATETIME
    GO
    INSERT INTO #Tickets
    VALUES (
    '44BS'
    ,'2014-01-01'
    INSERT INTO #Tickets
    VALUES (
    '44BS'
    ,'2014-01-05'
    INSERT INTO #Tickets
    VALUES (
    '44BS'
    ,'2014-01-07'
    INSERT INTO #Tickets
    VALUES (
    '32VT'
    ,'2014-01-03'
    INSERT INTO #Tickets
    VALUES (
    '32VT'
    ,'2014-01-09'
    INSERT INTO #Tickets
    VALUES (
    '32VT'
    ,'2014-01-11'
    GO
    GO
    SELECT *
    FROM #Tickets
    GO
    GO
    CREATE TABLE #tempDist (
    NRow INT
    ,TicketNo VARCHAR(4)
    ,MinDate DATETIME
    ,MaxDate DATETIME
    GO
    CREATE TABLE #tempUnUserdDate (
    TicketNo VARCHAR(4)
    ,MissDate DATETIME
    GO
    INSERT INTO #tempDist
    SELECT Row_Number() OVER (
    ORDER BY TicketNo
    ) AS NROw
    ,TicketNo
    ,Min(DateUpdated) AS MinDate
    ,MAx(DateUpdated) AS MaxDate
    FROM #Tickets
    GROUP BY TicketNo
    SELECT *
    FROM #tempDist
    GO
    -- Get the number of rows in the looping table
    DECLARE @RowCount INT
    SET @RowCount = (
    SELECT COUNT(TicketNo)
    FROM #tempDist
    -- Declare an iterator
    DECLARE @I INT
    -- Initialize the iterator
    SET @I = 1
    -- Loop through the rows of a table @myTable
    WHILE (@I <= @RowCount)
    BEGIN
    --  Declare variables to hold the data which we get after looping each record
    DECLARE @MyDate DATETIME
    DECLARE @TicketNo VARCHAR(50)
    ,@MinDate DATETIME
    ,@MaxDate DATETIME
    -- Get the data from table and set to variables
    SELECT @TicketNo = TicketNo
    ,@MinDate = MinDate
    ,@MaxDate = MaxDate
    FROM #tempDist
    WHERE NRow = @I
    SET @MyDate = @MinDate
    WHILE @MaxDate > @MyDate
    BEGIN
    IF NOT EXISTS (
    SELECT *
    FROM #Tickets
    WHERE TicketNo = @TicketNo
    AND DateUpdated = @MyDate
    BEGIN
    INSERT INTO #tempUnUserdDate
    VALUES (
    @TicketNo
    ,@MyDate
    END
    SET @MyDate = dateadd(d, 1, @MyDate)
    END
    SET @I = @I + 1
    END
    GO
    SELECT *
    FROM #tempUnUserdDate
    GO
    GO
    DROP TABLE #tickets
    GO
    DROP TABLE #tempDist
    GO
    DROP TABLE #tempUnUserdDate
    Thanks, 
    Shridhar J Joshi 
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Grouping to display null values for all the missing dates

    Hi SAP,
    I am trying to display '0.00' value for all the missing dates in my crystal reports as follows:
    17-Jan-14     40.00
    18-Jan-14       0.00
    19-Jan-14       0.00
    20-Jan-14     80.00
    However, my crystal report is showing as follows:
    17-Jan-14     40.00
    18-Jan-14       0.00
    19-Jan-14
    20-Jan-14     80.00
    The missing dates with no data are group together and my '0.00' value is not. Kindly advise me the solution. The formula is shown as per attached.
    Thank you.
    Regards.

    Hi,
    Thanks for your reply.
    Fyi, I am using a formula field in crystal report to display "0.00" for days in between as follows:
    whileprintingrecords;
    if Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy') = "" then "" else "0.00"
    There is another formula field in crystal report to display the missing dates in between as follows:
    whileprintingrecords;
    Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy')
    Below is my report custom functions:
    Function Days_Between (datefield as datetime, nextdatefield as datetime, format as string)
    ' This function is only used to display what data is missing within a specified date range...output type is text
    dim thisdate as date
    dim nextdate as date
    dim output as string 'output is the text display
    dim daysbetween as number
    dim looptimes as number
    looptimes = 0
    daysbetween = 0
    output = ""
    thisdate = datevalue(datefield) + 1
    nextdate = datevalue(nextdatefield)
    if nextdate - thisdate > 1 then daysbetween = nextdate - thisdate else daysbetween = 1
    do
    if nextdate - thisdate > 1 _
    then output = output + totext(thisdate, format) + chr(10) _
    else _
    if nextdate - thisdate > 0 _
    then output = output + totext(thisdate, format)
    looptimes = looptimes + 1
    thisdate = thisdate + 1
    loop until looptimes = daysbetween
        Days_Between = output
    End Function
    The issue arise when when there is more than one missing dates in between but the null values ("0.00") displayed is only for the first missing dates and not for all the missing dates.
    Regards,
    Ting Wei 

  • Shared variable, missing data, the same timestamp for two consecutiv​ely data

    hello
    I have a problem with missing data when I read from a network published shared variable.
    Host VI:
    In a host VI on my Laptop (HP with WinXP Prof.) i'm writing data to the shared Variable "data". Between two consecutively write operations is a minimum of Milliseconds waiting time. I use that because I want to be sure that the timestamp for each new data value is different then the preview one (resolution shared variables is 1 ms)
    Target VI:
    the Target VI on a cRIO-9012 realtime device is reading only new data in the way that it compares the timestamp of a new value with the timestamp from the last value.
    Problem:
    rarely, I'm missing a datapoint (sometimes everything works fine for several hours, transferring thousands of data correctly before suddenly the failure happens). With some workaround I'm able to catch the missing data. I've discovered that the missing data has the exactly same timestamp then the last readed datapoint, therefore is ignored in my "legal" data.
    To sum up, the missed value is written to the shared variable in the host, but the target ignores him because his timestamp is wrong, respectively the same as the last value has, despite the host waits every time for a minimum of 10 milliseconds before writing a new value.
    Note:
    The shared Variable is hosted on the Laptop and configured using buffering.
    The example is simplified only to show the principle function, in real I use also a handshaking and I secure that there is no over- and underflow.
    Simplified Example:
    Question:
    Has someone an idea why two consecutively data can have the same timestamp ?
    Where is the (wrong) timestamp finally coming from (system?) ?
    What would be a possible solution (at the moment with shared Variables) ?
    -> I tried a workaround with clusters where each data gets a  unique ID. It works but it is slower than comparing timestamps and I could get performance problems.
    Would it change something when I host the shared Variable on the RT-System ?
    Thanks for your help
    Regards
    Reto
    Solved!
    Go to Solution.

    Hi Reto,
    I had a look on your modified Example.
    Because the Shared Variables didn`t work like Queues or Notifiers (No Event or Interrupt when a new value has been written. And for sure the´re not possible over a network) you will see the issue, that the code is reading the values more often with the same timestamp (Polling Problematic) if the reader is faster then the writer. And because the timestamp is written with the value you´re able to program like you do. Filter out whats duplicated when you have the same timestamp.
    Everything is described in here:
    http://zone.ni.com/devzone/cda/tut/p/id/4679#toc1
    Laurent talked about a second depth of buffer. Please have also a look at the link. Somewhere in the middle of the tutorial you see the explanations of Buffer and RT-Buffer.
    Regarding your question: Would it change something when I host the shared Variable on the RT-System? --> No
    In my experiences, you should consider to place the Shared Variable Engine after asking some questions regarding the application.
    You will find the Answers to this 3 Questions also in the link:
    Does the application require datalogging and supervisory functionality?
    Does the computing device have adequate processor and memory resources?
    Which system is always online?
    And you`re right the smalles time interval you can see in the timestamp is 1ms.!
    What you also can do is working with an enabled "timed out". This might be more performance efficient than reading the timestamp.
    What I don`t know and not find up to now, is if LabVIEW or the OS adds the timestamp. It´s taken from the system time, this looks like LabVIEW is taking the value and adds it. 
    I hope this helps
    Alex
    NI Switzerland

  • Date Function Error

    Hello,
    I am trying to calculate Goods movement date and used DATE Function "Between" to find out the dates between BUDAT and Current Date/System Date(used date function NOW().
    between(BUDAT,AGEING_DATE)
    Validate syntax doesn't show any error, however while activating view I am getting below error:
    Message :
    Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Analytic View (CV): nnAttribute 'aging_day' is missing in node finalAggregation(CalculationNode (finalAggregation) -> attributes -> calculatedAttribute (GOODS_MOVEMENT_DATE) -> expression)nnThe following errors occured: Inconsistent calculation model (34011)nDetails (Errors):n- CalculationNode (finalAggregation) -> attributes -> calculatedAttribute (GOODS_MOVEMENT_DATE) -> expression: Attribute 'aging_day' is missing in node finalAggregation.n- CalculationNode (finalAggregation) -> attributes -> calculatedAttribute (GOODS_MOVEMENT_DATE) -> expression: Attribute 'budat' is missing in node finalAggregation.nnDetails (Warnings):n- cubeSchema: Default language not set. Use 'en'.nnnn<?xml version="1.0" encoding="utf-8"?><cubeSchema version="3" operation="createCalculationScenario"><calculationScenario name="Inventory_Aging/AV_INVENTORY_AGING_PER_SITE" schema="_SYS_BIC"><dataSources><olapDataSource name="dataSource" schema="_SYS_BIC"
    Any inputs are highly appreciable.
    BR
    Vijaya

    Hi @Vijaya Lakshmi,
    Could you please check this part of the error message in detail:
    Error:Deploy Analytic View (CV): nnAttribute 'aging_day' is missing in node finalAggregation(CalculationNode (finalAggregation
    BR
    Prabhith

  • Due Date function for Reminders

    Apple needs to incorporate the due date function into the Reminders app so we don't have to do this separately from the icloud website
    This is obviously a glitch,   if we complain enough maybe this will be fixed  
    currently the only way to set due dates for reminders requires being sneaking as this article explains
    this needs to be fixed
    http://reviews.cnet.com/8301-13727_7-57495293-263/how-to-set-a-due-date-for-moun tain-lion-reminders/

    I've found a way, but it's annoyingly complicated:
    1. Export your reminders list (produces a .ics file)
    2. Open the .ics file with a plain text editor (I used TextMate, but I'm sure any editor would work).
    3. Search for the reminder.
         -Say you are looking for "Homework 5", you should find something like this:
              SUMMARY:Homework 5
    4. Below that field (but before END:VTODO) there are 2 fields:
              DUE;TZID=America/Los_Angeles:20121108T140000
         and
              TRIGGER;VALUE=DATE-TIME:20121108T140000Z
    5. TRIGGER is when you want to be reminded. DUE is the missing due field if it doesn't match TRIGGER.
    6. Modify TRIGGER to a legit time (24-hr, of course):
              TRIGGER;VALUE=DATE-TIME:20121107T180000Z
    7. Save and Import the modified .ics file back into a new list in reminders. Then, delete the original list.
    8. You should see the due field now and be able to edit the dates natively within the app.
    9. You're killing me, Apple. The due field would be extremely useful, especially for students like me. I wish the presence of the due field were toggle-able in Settings>Reminders.
    10. While I'm ranting about my wishes, the repeat feature would be much more useful if the frequency were completely customizable (i.e. Repeat every [#] [wks/hrs/days] or Repeat every [1st/2nd/3rd/etc.] [Day of week] of every [1st/2nd/3rd/etc.] [month/week] and so on... ).

  • Missing data in queue

    I have 4 asynchronous running VIs that share data between each other via queues.  The producer VI puts the data on 2 different queues; one for a consumer VI to write data to a file and one for 2 consumer VIs to display data.  The first display VI takes all the data (in waveform format) and converts it to a string for display in a table.  The second display VI takes a subset of the data and converts it to DBL for display on individual indicators.
    I am not experiencing any lost data being written to the data file.  I am experiencing missing data for the displays.  I put a test sine wave on one of the data channels to figure out which queue output is having the problem.  There are about 90 channels of data being collected.
    The table VI only displays the latest data point for each channel in the table.  I didn't notice any missing data until I wired the test channel into a chart.  I thought could be an update issue.  However, ...
    The subset VI displays all the data from the test channel in a chart and there is missing data.  Out of all the channels only one is being displayed.
    The producer VI puts the data on the queue using Lossy Enqueue Element function.  The consumers get the data from the queue using the Preview Queue Element function.
    Any ideas on where to begin to diagnosis the problem?  I would post code but I haven't successfully posted any files to this forum.  Is there any other location I could post?

    Bob_Schor wrote:
         Can you point to an example, or provide one?  This sounds like an Interesting Technique to Learn ...
    I do this all the time.  My prime example is with data that needs logged and updated to the GUI.  So I have one loop that processes data and then sends it by generating a User Event.  I then have a data logging loop that is registered for the event that can log the data.  I will then have another loop that handles the GUI that is registered for the event to just update an indicator.
    This example is a lot dumber than that (it just updates two indicators).  Saved in 2014.  Let me know if you need an older version.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    User Event.zip ‏17 KB

  • 3113: Activity 'XXPONIT/233480' is missing a function reference.

    Hello All,
    I have designed a workflow in which i have to call workflow for n number of times.
    In this workflow i have taken one notification and one function . when user submits workflow, its reached to user's parent level(1). If it approves then forwarded to function. it will check whether for that parent level(1) parent is found or not. if parent is found then it will identify the parent level(2) and sets into Attribute level(1) .
    and forwarded back to notification.
    when i am trying to run this workflow am getting the *(3113: Activity 'XXPONIT/233480' is missing a function reference.) error.
    Eg. ____________Yes_______
    | |
    v Approve | No
    Start---> Notification ------------------> function ------------------> End
    | ^
    |_____________________________________|
    Reject
    I am pasting pl/sql code here: Suggest me where i am wrong:
    create or replace package body XXPO_WF_NIT_APPROVAL_PKG is
    v_user_id number;
    v_user_name VARCHAR2(15);
    v_flag_parent_exist varchar2(1);
    v_item_key NUMBER;
    PROCEDURE WF_START_PROCESS(p_user_id NUMBER) IS
    v_initiator varchar2(15);
    BEGIN
    /*To generate Unique Value for item key*/
    SELECT XXPO_NIT_SEQ.nextval INTO v_item_key FROM dual;
    dbms_output.put_line('item key ' ||v_item_key);
    /* To create Workflow Process*/
    wf_engine.CreateProcess(itemtype => 'XXPONIT',
    itemkey => v_item_key,
    process => 'NIT_PROC');
    /* For Getting Initiator name who has initiated workflow*/
    SELECT fu.user_name INTO v_initiator
    FROM fnd_user fu
    where user_id = p_user_id;
    /*for getting next approver level user name and user Id*/
    SELECT fu1.user_name,fu1.user_id INTO v_user_name,v_user_id
    FROM per_all_assignments_f paaf1,
    fnd_user fu1
    WHERE paaf1.person_id = fu1.employee_id
    AND paaf1.position_id IN (SELECT ppse.parent_position_id
    FROM per_position_structures pps,
    per_pos_structure_elements ppse
    WHERE pps.position_structure_id = ppse.pos_structure_version_id
    AND pps.position_structure_id = 4061 /*PO Test NIT Heirarchy*/
    AND ppse.subordinate_position_id IN (SELECT DISTINCT paaf.position_id
    FROM Per_All_Assignments_f paaf
    WHERE paaf.position_id IS NOT NULL
    AND paaf.person_id IN (SELECT papf.person_id
    FROM per_all_people_f papf,
    fnd_user fu
    WHERE fu.employee_id = papf.person_id
    AND papf.current_employee_flag = 'Y'
    AND trunc(SYSDATE) BETWEEN papf.effective_start_date
    AND papf.EFFECTIVE_END_DATE
    AND fu.user_id = p_user_id/*1547*/ )));
    wf_engine.SetItemAttrText(itemtype => 'XXPONIT',
    itemkey => v_item_key,
    aname => 'INITIATOR',
    avalue => v_initiator);
    dbms_output.put_line(v_initiator);
    wf_engine.SetItemAttrText(itemtype => 'XXPONIT',
    itemkey => v_item_key,
    aname => 'ATR_LEVEL1',
    avalue => v_user_name);
    dbms_output.put_line('6');
    wf_engine.StartProcess(itemtype => 'XXPONIT',
    itemkey => v_item_key);
    COMMIT;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    dbms_output.put_line('In WF_START_PROCESS' ||SQLCODE || ':No data found' || SQLERRM);
    WHEN DUP_VAL_ON_INDEX THEN
    dbms_output.put_line('In WF_START_PROCESS' ||SQLCODE || ':Duplicate values found' || SQLERRM);
    WHEN OTHERS THEN
    dbms_output.put_line('In WF_START_PROCESS' ||SQLCODE || ':Other Exception' || SQLERRM);
    END WF_START_PROCESS;
    --====================End of WF_Start procedure================
    procedure is_comment_null(itemtype IN VARCHAR2,
    itemkey IN VARCHAR2,
    actid IN NUMBER,
    funcmode IN VARCHAR2,
    resultout OUT VARCHAR2) is
    v_comments_fst_level varchar2(200);
    v_result_fst varchar2(100);
    v_count number;
    BEGIN
    v_comments_fst_level := WF_NOTIFICATION.GetAttrText(WF_ENGINE.CONTEXT_NID,
    'COMMENT_FST');
    v_result_fst := WF_NOTIFICATION.GETATTRTEXT(WF_ENGINE.CONTEXT_NID,
    'RESULT');
    dbms_output.put_line(v_result_fst);
    IF( FUNCMODE = 'RESPOND') THEN
    IF (v_result_fst = 'REJECTED') THEN
    IF v_comments_fst_level IS NULL THEN
    RESULTOUT :='ERROR: Comment is required while rejecting the request';
    RETURN;
    END IF;
    END IF;
    END IF;
    dbms_output.put_line(SQLCODE || ':No data found' || SQLERRM);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    dbms_output.put_line('is_comment_null'|| SQLCODE || ':No data found' || SQLERRM);
    WHEN DUP_VAL_ON_INDEX THEN
    dbms_output.put_line('is_comment_null' || SQLCODE || ':Duplicate values found' || SQLERRM);
    WHEN OTHERS THEN
    dbms_output.put_line('is_comment_null'|| SQLCODE || ':Other Exception' || SQLERRM);
    END is_comment_null;
    --===================================
    PROCEDURE Next_approver(ITEMTYPE IN VARCHAR2,
    ITEMKEY IN VARCHAR2,
    ACTID IN NUMBER,
    FUNCMODE IN VARCHAR2,
    RESULTOUT OUT NOCOPY VARCHAR2)
    IS
    v_count number;
    BEGIN
    --==============To initiate next approval workflow================
    IF( FUNCMODE = 'RUN') THEN
    SELECT count(fu1.user_name) INTO v_count
    FROM per_all_assignments_f paaf1,
    fnd_user fu1
    WHERE paaf1.person_id = fu1.employee_id
    AND paaf1.position_id IN (SELECT ppse.parent_position_id
    FROM per_position_structures pps,
    per_pos_structure_elements ppse
    WHERE pps.position_structure_id = ppse.pos_structure_version_id
    AND pps.position_structure_id = 4061
    AND ppse.subordinate_position_id IN (SELECT DISTINCT paaf.position_id
    FROM Per_All_Assignments_f paaf
    WHERE paaf.position_id IS NOT NULL
    AND paaf.person_id IN (SELECT papf.person_id
    FROM per_all_people_f papf,
    fnd_user fu
    WHERE fu.employee_id = papf.person_id
    AND papf.current_employee_flag = 'Y'
    AND trunc(SYSDATE) BETWEEN papf.effective_start_date
    AND papf.EFFECTIVE_END_DATE
    AND fu.user_id = v_user_id)));
    IF v_count > 0 THEN
    v_flag_parent_exist := 'Y';
    /* To get next approver name */
    SELECT fu1.user_name INTO v_user_name
    FROM per_all_assignments_f paaf1,
    fnd_user fu1
    WHERE paaf1.person_id = fu1.employee_id
    AND paaf1.position_id IN (SELECT ppse.parent_position_id
    FROM per_position_structures pps,
    per_pos_structure_elements ppse
    WHERE pps.position_structure_id = ppse.pos_structure_version_id
    AND pps.position_structure_id = 4061
    AND ppse.subordinate_position_id IN (SELECT DISTINCT paaf.position_id
    FROM Per_All_Assignments_f paaf
    WHERE paaf.position_id IS NOT NULL
    AND paaf.person_id IN (SELECT papf.person_id
    FROM per_all_people_f papf,
    fnd_user fu
    WHERE fu.employee_id = papf.person_id
    AND papf.current_employee_flag = 'Y'
    AND trunc(SYSDATE) BETWEEN papf.effective_start_date
    AND papf.EFFECTIVE_END_DATE
    AND fu.user_id = v_user_id)));
    --WF_START_PROCESS(v_user_id);
    wf_engine.SetItemAttrText(itemtype => 'XXPONIT',
    itemkey => v_item_key,
    aname => 'ATR_LEVEL1',
    avalue => v_user_name);
    ELSE
    v_flag_parent_exist := 'N';
    END IF;
    END IF;
    IF v_flag_parent_exist = 'Y' THEN
    RESULTOUT := 'Y';
    ELSE IF v_flag_parent_exist = 'N' THEN
    RESULTOUT := 'N';
    END IF;
    END IF;
    END Next_approver;
    end XXPO_WF_NIT_APPROVAL_PKG;
    Thanks,
    sheetal Mittal

    HI
    I believe the document that you are looking for can be found in the following location. This help file describes the NI-DAQmx Library functions, which you can use with National Instruments data acquisition and switch devices to develop instrumentation, acquisition, and control applications.
    Message Edited by jaced on 11-05-2007 12:18 PM
    JaceD
    Signal Sources Product Support Engineer
    National Instruments
    Attachments:
    NI-DAQmx C help.jpg ‏98 KB

  • "Missing external function lvanlys.dll" when running EXE

    Windows 7 x32, LV2009SP1 / LVRuntime 2009
    I am trying to build an EXE from a customer's code.  They use the analysis library (NI_AALBase.lvlib).
    It runs fine on my dev machine.  When I build the EXE and pass it to a target machine with LVRuntime on it, I get the error:
    Missing external function lvanlys.dll: Mean_head:C NI_AALBase.lvlib:Mean.vi.
    I explicitly added the lvanlys library to the project.  I added the library as a source file in the build.  Finally I added the DLL itself to the project and as a source for the build.
    Always the same error.  The DLL is located in the data folder after the build.  I tried to move it into the same folder as the EXE, and into the system32 folder.  Nope.
    I just changed the DLL's extension to dllx and tried again, and I get the same error, so it looks like it can't find it.
    Do I need to register this DLL or something?  Does it need a support file?
    Solved!
    Go to Solution.

    Runawaycode wrote:
    As the application was launched, a pop up window suggested to download the Labview run time engine, and an internet address was suggested.
    I am not aware that there is a download link suggestion. Can you show us a picture of the popup window? Does the link really point to the minimum run time engine? That would be hard to believe.....
    Runawaycode wrote:
    National Instruments should warn the users that there are more download versions or possibly suggest the complete version if something goes wrong. 
    The download page for the run time engine is very specific about the various versions. It is a matter of actually reading it.
    It is even more clear in the newer versions, where the minimum run time version has been renamed into web browser plugin. The description is:
    This is the download page for the LabVIEW 2012 (32-bit) Remote Front Panel Web Browser Plug-in (formerly known as the Minimum Run-Time Engine). The Web Browser Plug-in is a smaller download intended for viewing VIs embedded in a web page.  It does not contain the full run-time engine and is not recommended for running executables.
    Compare with the standard run time engine where the description is:
    "This Run-Time Engine must be installed on any 32-bit or 64-bit Windows system where you plan to run executables that you build with the Application Builder in LabVIEW 2012 or 2012 SP1 (32-bit). Executables built with LabVIEW 2012 or 2012 SP1 (64-bit) require the LabVIEW 2012 (64-bit) Run-Time Engine.
    Additionally, the Run-Time Engine allows your browser to display VIs embedded in Web pages."
    I am not sure how much clearer it could be made. Do you have a suggestion?
    LabVIEW Champion . Do more with less code and in less time .

  • Help needed with missing data problem in CRVS2010

    We recently upgraded the reporting engine in our product to use Crystal Reports for Visual Studio 2010 (previously engine was CR9). Our quote report, which has numerous subreports and lots of conditional formatting, started losing data when a quote took more than a single page to be printed. We knew the SQL results included the data, but the report was not printing those lines at all or sometimes printing a partial line. In addition, the running total on the report would exclude the lines that were being missed on the next page. In one example submitted by a customer, 3 lines were skipped between pages.
    I think I have identified two potential issues that document the possibility of data not being included in the report.
    The first potential issue is an issue with the "suppress blank section" option being checked. This issue is supposedly fixed with ADAPT01483793, being released someday with service pack 2 for CRVS2010.
    The second potential issue is using shared variables. This issue is supposedly fixed with ADAPT01484308, also targeted for SP2.
    Our quote report does not explicitly use shared variables with any of the subreports, but it does have several subreports, each in its own section that has the "supress blank section" option checked. We have other reports that use this feature, as well, and they are not exhibiting the problem.
    One different thing about the quote report is that it has a section with multiple suppression options selected. The section has a conditional suppression formula, which controls whether the section is included at all within the report. The section also has the suppress blank section option selected. There are multiple fields within the report that are each conditionally suppressed. In theory, the section's suppress formula could evaluate to true, yet all of the fields within the section are suppressed (due to null values), and then the "suppress blank section" option would kick in.
    The missing data only seems to happen when the section is not being suppressed, and at least one of the fields is being included in the report. If I clear the "suppress blank section" check box, and change the section formula to also include the rules applied to the fields in the section, the missing data problem seems to be resolved.
    Is this related to ADAPT01483793? Will it be fixed in service pack 2?
    If more details are needed, I would be happy to provide a sample report with stored data.

    Hi Don,
    Have a look at the Record Selection formula in CR Designer ( stand alone ) and when exported to RPT format opening that report in the Designer also. 
    There's been a few issues with => logic in the record selection formula. It could be you are running into this problem. Look for NOT inserted into your selection formula.
    Oh and SP2 is coming out shortly so it may resolve the issue. But if you want you could purchase a support, or if you have a support contract then create a case in SMP and get a rep to work with you to debug the issue.
    If you have not try the Trial Version of CR 2011, put it on a VM-ware image or Test PC so you don't corrupt anything for production and have a look at and test it in that designer also. If you purchase a case and it is a bug then you'll get a credit back for the case.
    Don
    Edited by: Don Williams on Oct 26, 2011 7:40 AM

  • Insert old missing data from one table to another(databaase trigger)

    Hello,
    i want to do two things
    1)I want to insert old missing data from one table to another through a database trigger but it can't be executed that way i don't know what should i do in case of replacing old data in table_1 into table_2
    2)what should i use :NEW. OR :OLD. instead.
    3) what should i do if i have records exising between the two dates
    i want to surpress the existing records.
    the following code is what i have but no effect occured.
    CREATE OR REPLACE TRIGGER ATTENDANCEE_FOLLOWS
    AFTER INSERT ON ACCESSLOG
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    V_COUNT       NUMBER(2);
    V_TIME_OUT    DATE;
    V_DATE_IN     DATE;
    V_DATE_OUT    DATE;
    V_TIME_IN     DATE;
    V_ATT_FLAG    VARCHAR2(3);
    V_EMP_ID      NUMBER(11);
    CURSOR EMP_FOLLOWS IS
    SELECT   EMPLOYEEID , LOGDATE , LOGTIME , INOUT
    FROM     ACCESSLOG
    WHERE    LOGDATE
    BETWEEN  TO_DATE('18/12/2008','dd/mm/rrrr') 
    AND      TO_DATE('19/12/2008','dd/mm/rrrr');
    BEGIN
    FOR EMP IN EMP_FOLLOWS LOOP
    SELECT COUNT(*)
    INTO  V_COUNT
    FROM  EMP_ATTENDANCEE
    WHERE EMP_ID    =  EMP.EMPLOYEEID
    AND    DATE_IN   =  EMP.LOGDATE
    AND    ATT_FLAG = 'I';
    IF V_COUNT = 0  THEN
    INSERT INTO EMP_ATTENDANCEE (EMP_ID, DATE_IN ,DATE_OUT
                                ,TIME_IN ,TIME_OUT,ATT_FLAG)
         VALUES (TO_NUMBER(TO_CHAR(:NEW.employeeid,99999)),
                 TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'),       -- DATE_IN
                 NULL,
                 TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'),      -- TIME_IN
                 NULL ,'I');
    ELSIF   V_COUNT > 0 THEN
    UPDATE  EMP_ATTENDANCEE
        SET DATE_OUT       =  TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'), -- DATE_OUT,
            TIME_OUT       =   TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'), -- TIME_OUT
            ATT_FLAG       =   'O'
            WHERE EMP_ID   =   TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
            AND   DATE_IN <=  (SELECT MAX (DATE_IN )
                               FROM EMP_ATTENDANCEE
                               WHERE EMP_ID = TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
                               AND   DATE_OUT IS NULL
                               AND   TIME_OUT IS NULL )
    AND   DATE_OUT  IS NULL
    AND   TIME_OUT IS NULL  ;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END ATTENDANCEE_FOLLOWS ;
                            Regards,
    Abdetu..

    INSERT INTO SALES_MASTER
       ( NO
       , Name
       , PINCODE )
       SELECT SALESMANNO
            , SALESMANNAME
            , PINCODE
         FROM SALESMAN_MASTER;Regards,
    Christian Balz

  • Data Federator Universe Date Functions

    Hi,
    I created a Data Federator Universe from target tables (Source Tables from: Sql Server 2005 and Oracle 10g). Now, I want to create a object in the universe: "Days between 2 dates"(coming from 2 different target tables). I don't see any other date functions other than CURDATE(). How to create my object?
    Alternatively, Can I create a caliculated column in the existing target table? For Example, I want to create a new column "Days between 2 Dates" from 2 different tables by using a formula in Default mapping of the target table.
    Thanks & Regards,
    Peter

    Hi Amit,
    Thanks for your reply.
    Ok. So, Universe on top of Data Federator has limited functionality.
    And, other option you mentioned is on report level. I am creating an adhoc universe and I have few objects which will calculate days between 2 dates coming from 2 different tables.
    But, how can I achieve this on Data Federator level. I have no function there to find Days Between 2 dates. I see lot of time and date functions but not the one I required. Also, I added a column in the target table and tried to apply the formula there in the default mapping area. But, I see only the selected target table. I need another date column from another table, which is not displayed in the default mapping area.
    How can I achieve this?
    Regards,
    -Peter

  • Missing Data from Legacy System

    Hello All,
    My client went live end of January this year. They had a month of transaction data in their legacy system which they did not bring into SAP. Since this is their first year on SAP and recently implemented Extended Withhold Tax one month data is missing; when they run the 1099s at the end of the year they are going to be reported incorrectly.
    How can we bring over that missing data from legacy system over to SAP without having to clear those invoices in SAP?
    Thank You In Advance

    Hi Shashi,
       Have a look : <a href="http://www.box.net/shared/9tda040za6">Transferring Data with DB Connect</a>
    <a href="http://sapbwneelam.blogspot.com">More Docs...</a>
    Hope it Helps
    Srini

  • Print a DayName without using Date functions

    Hi,
    I have an assignment like without using any date functions i should print a calendar.
    Below is the code without using any datefunctions like dateadd, datediff, datename a calendar has been generated for month and year entered. I want a week name for the dates like sunday ... monday etc. 
    I can take any date from calendar as reference  and calculate based on that date.
    ex: today is 2/20/2014 thursday . Next 7days again will be thursday, same way before 7days will be thursday.
    I need to loop in below procedure and get weekname. 
    Plz help in the code,
    I am using SQL server 2008
    IF OBJECT_ID ('dbo.Calendar1') IS NOT NULL
         DROP PROCEDURE dbo.Calendar1
    GO
    CREATE  PROCEDURE [dbo].Calendar1 --4,1991
       @month int,
       @Year  int
     AS  
     BEGIN
     declare 
     @startdateofMonthYear date,
     @EnddateofMonthYear Date
    Set @startdateofMonthYear=(Select cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'01')
    Set @EnddateofMonthYear = (SELECT case when @month IN (1,3,5,7,8,10,12) then cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'31'
    when @month IN(4,6,9,11) then cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'30'
    else  cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+(CASE WHEN (@YEAR % 4 = 0 AND @YEAR % 100 <> 0) OR @YEAR % 400 = 0 THEN '29' else '28' End) 
    End) 
    ;WITH CTE_DatesTable
    AS
    Select 1 daysint, Cast(SUBSTRING(cast(@startdateofMonthYear as varchar(20)),1,7) + '-'+CAST(1 as varchar(2)) as DATE) Calendardates
    UNION ALL
    SELECT   daysint+1,Cast(SUBSTRING(cast(@startdateofMonthYear as varchar(20)),1,7) + '-'+CAST(daysint+1 as varchar(2)) as DATE) Calendardates
    FROM CTE_DatesTable
    WHERE  daysint<= 
    (SELECT case when @month IN (1,3,5,7,8,10,12) then 31
    when @month IN(4,6,9,11) then 30
    else  (CASE WHEN (@YEAR % 4 = 0 AND @YEAR % 100 <> 0) OR @YEAR % 400 = 0 THEN 29 else 28 End) 
    End)-1
    Select 
    [DWDateKey]=Calendardates,
    [DayDate]=daysint,
    [MonthNumber]=@Month,
    [MonthName]=Case when @month = 1 then 'January'
     when @month  = 2 then 'February'
     when @month  = 3 then 'March'
     when @month  = 4 then 'April'
     when @month  = 5 then 'May'
     when @month  = 6 then 'June'
     when @month  = 7 then 'July'
     when @month  = 8 then 'August'
     when @month  = 9 then 'September'
     when @month  = 10 then 'October'
     when @month  = 11 then 'November'
     when @month  = 12 then 'December' 
    End,
    [Year]=@Year
    From CTE_DatesTable
    END
    bhavana

    In the above code, where do i pass the year and month?
    (Select 2000 YearID
    Union All
    Select YearID +1 From cte where YearID <2100
     In above condition from 2000 year its displaying.
    If i want in 90's year , Day name will not be correct.
    Deepa

  • Date function doesn't work in Message Subject when scheduling batch

    Hi,
    When I was scheduling a batch and went to PDF attached E-Mail panel, in the Message Subject line I added a function <<Date(yyyy-MM-dd)>>,but when the email was sent, the date function in the subject didn't show the actual date, just showed the original function text <<Date(yyyy-MM-dd)>>, Is there anyone can help on this? Thanks in advance.

    Hi,
    Can I know the Hyperion Version you referring ?
    regards,
    Harish.

Maybe you are looking for