Count the no. of items in a block by giving a WHERE CLAUSE

I have a Form in Developer 2000.
In that form there is a block.
The block contains 3 columns -- trdate, subcode and wcode
wcode=F stands for Friday. According to the rule here, if a worker is absent (subcode=AB) for 2 days in a week the program should automatically display AB on that Friday.
(i.e. Check the data between Saturday through Thursday. If 2 days are AB then put AB on Friday also)
OR
At the bottom of the form there is a display field.
As we enter data into this table it should update the display field by counting the no. of AB's in a week.
trdate subcode wcode
15/01/2004 NULL
16/01/2004 NULL
17/01/2004 AB
18/01/2004 AB F
19/01/2004 NULL

Sreenivas,
You may get a quick answer if you post this in the
Forms Forum.
Forms

Similar Messages

  • Dynamic Counter in BEx Report to count the drilldown line item.

    Hi,
    I have a requirement to show the count of different parts in a report. For example the report,
    Part Number            Costs
    100                    200 $
    and if you drill down from the part number to line item details, you will get,
    Item Number            Costs
    10                      50 $
    20                      50 $
    30                      50 $
    40                      50 $
    So basically Part Number 100 is consists of 4 Item numbers. Now I want to show original report like this,
    Part Number            Costs               Counter
    100                    200 $               4
    Is there any way I can catch that counter, like how many line item is there per Part Number ?
    I am thinking of 2 ways, Virtual key Figure to calculate this or in alternate if possible use the Classification extractor (not sure if it possible to count the number of items per classification extractor though).
    Is there any better or simpler way to deal this without changing the cube structure ?
    Thanks for your time spent on this,
    Kind Regards,
    Arpan

    Hi,
    You can get this functionality with Virtual Key figures.
    You will have the complete dataset in the RSR00002 Enhancement in CMOD.
    Thank you
    Arun

  • How to count the number of dirty and clean block

    i want to count the number of dirty and clean block.
    because i want to know which datablock is updated.

    I dont think it is possible to count the no. of dirty and clean blocks. But we can understand the implications of intelligent calculation by understanding when the blocks are marked dirty and clean.
    Here are few cases.
    There are four definable circumstances under which datablocks are marked dirty, thereby making them eligible for calculation on the next round using intelligent calc.
    1. Input Data: Any block created from a data load or lock & send is automatically marked dirty when created.
    2. Modified Data: Any block for whom a data cell has been modified is marked dirty and therefore eligible for calculation using intelligent calc on the next calculation round.
    3. Ancestors Of Condition 1 & 2
    4. Restructure The Database: Blocks changes as a result of outline changes potentially become dirty.
    There are three definable circumstances under which Intelligent Calc operates, thereby marking blocks clean.
    1. Calc Dim On All Dimensions: When you execute a calc script which contains a CALC ALL statement or CALC DIM statement whose arguments include all dimensions.
    2. Set ClearUpdateStatus After: SET CLEARUPDATESTATUS AFTER is a calc script command that will engage Intelligent Calc for any calc script regardless of construction.You typically use this command where you cannot meet the conditions in 1 above for a Calc Dim on all dimensions.
    3. Set ClearUpdateStatus Only: SET CLEARUPDATESTATUS ONLY is a calc script command that does not calculate. When included in a calc script, this command only
    marks dirty blocks clean. That's all.

  • Workflow to count the number of items in a list

    Hello Friends,
    I've a requirement, I need to count the number documents uploaded for a particular list item (identified by a unique Title) and if the count matches with the count stored in another list for that particular list item, bingo......I will update the status
    field to completed.
    Can anybody please help me with this. How do I do this ? Is it possible even ?
    Thank you very much in advance. :)

    Hi,
    I haven't tried this but i think you can achieve it by
    1. Add an Call HTTP activity in your workflow and make a REST call get items
    2. Use Count Items in (Dictionary variable)to get the Items counts of attachment.
    3. Then, lookup for your another list in match item count.
    Your REST query can be similar to this
    url: http://site url/_api/web/lists/getbytitle('list title')/items(item id)/AttachmentFiles/To make Rest call in SharePoint designer https://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/
    https://msdn.microsoft.com/en-us/library/office/dn567558%28v=office.15%29.aspx

  • Improve the performance in stored procedure using sql server 2008 - esp where clause in very big table - Urgent

    Hi,
    I am looking for inputs in tuning stored procedure using sql server 2008. l am new to performance tuning in sql,plsql and oracle. currently facing issue in stored procedure - need to increase the performance by code optmization/filtering the records using where clause in larger table., the requirement is Stored procedure generate Audit Report which is accessed by approx. 10 Admin Users typically 2-3 times a day by each Admin users.
    It has got CTE ( common table expression ) which is referred 2  time within SP. This CTE is very big and fetches records from several tables without where clause. This causes several records to be fetched from DB and then needed processing. This stored procedure is running in pre prod server which has 6gb of memory and built on virtual server and the same proc ran good in prod server which has 64gb of ram with physical server (40sec). and the execution time in pre prod is 1min 9seconds which needs to be reduced upto 10secs or so will be the solution. and also the exec time differs from time to time. sometimes it is 50sec and sometimes 1min 9seconds..
    Pl provide what is the best option/practise to use where clause to filter the records and tool to be used to tune the procedure like execution plan, sql profiler?? I am using toad for sqlserver 5.7. Here I see execution plan tab available while running the SP. but when i run it throws an error. Pl help and provide inputs.
    Thanks,
    Viji

    You've asked a SQL Server question in an Oracle forum.  I'm expecting that this will get locked momentarily when a moderator drops by.
    Microsoft has its own forums for SQL Server, you'll have more luck over there.  When you do go there, however, you'll almost certainly get more help if you can pare down the problem (or at least better explain what your code is doing).  Very few people want to read hundreds of lines of code, guess what's it's supposed to do, guess what is slow, and then guess at how to improve things.  Posting query plans, the results of profiling, cutting out any code that is unnecessary to the performance problem, etc. will get you much better answers.
    Justin

  • Need to count the number of groups in a Crystal Reports 2008 report

    I have created a report with three levels of grouping. There are several items in each level.  I want to count the number of groups.  I have tried countdistinct but it counts the number of items in the lowest level of grouping and I want the number of items in the higher  levels.  This is a distribution data base.  I have the data grouped by date, by truck on each date, and by "run" or load on each truck on each date.  I want to count the total number of groups of truck and run, which is the second level of the grouping.  Any ideas? I am fairly new to Crystal.

    Hi Debbie,
         To count the number of groups please try the folling steps:
    1) Create a formula @reset and place this formula in the page header
        whileprintingrecords;
        numbervar i:=0;
    2) Create another formula @evalgroup place this in the group header where you want to count the values.
        whileprintingrecords;
        numbervar i:= i+1;
    3) Create another formula @display and place this in report footer.
        whileprintingrecords;
        numbervar i;
    In order to display the count of details which are printing in the detail section place the eval formula in the detail section and the @display formula in the group footer.
    Hope this helps!!!
    Regards,
    Vinay

  • How can I count the number of unique cells?

    I have a column in my spreadsheet that looks like this:
    Date
    Items
    3/25
    Item A
    3/27
    Item A
    3/29
    Item A
    3/25
    Item A
    4/25
    Item B
    6/1
    Item B
    7/13
    Item B
    8/9
    Item B
    3/5
    Item C
    1/2
    Item C
    5/15
    Item D
    3/25
    Item D
    What I want is something that will list all the unique items that I have and count the number of times that Item shows up in my spreadsheet.  For example, the results should look like this:
    Item A: 3
    Item B: 4
    Item C: 2
    Item D: 2
    I thought for sure that I can do a chart in numbers and it would count the number of items but no, not so much.

    I apologize. When I pasted the table in Numbers running in French the values of column B were treated as dates.
    I leave the screenshot untouched because the contents of this column changes nothing to the calculations.
    In cell D2 of the main table, the formula is :
    =IF(ISBLANK(C),0,IF(COUNTIF($C$2:$C2,"="&$C2)=1,COUNTIF(C,"="&$C2)+(ROWS(A)-ROW( ))/100000,0))
    Apply Fill Down
    In cell A2 of table aux, the formula is :
    =IFERROR(LARGE(main :: D,ROW()-1),"")
    In cell B2 of table aux, the formula is :
    =IF(A>0,LOOKUP(A2,main :: D,main :: C),"")
    In cell C2 of table aux, the formula is :
    =INT(A)
    Apply Fill Down
    Yvan KOENIG (VALLAURIS, France) samedi 6 août 2011 23:33:10
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • "DO_KEY('EDIT')" works on some text items but not on the other text items

    I have a form with 2 data blocks. You can click on the 'Edit' button and the editor appears for all items displayed on the 1st block. However, for the 2nd block, the editor only shows when you click on 'Edit' when the cursor is placed on the primary key (of the data block). The other displayed items of this block shows nothing when you click on 'Edit'.
    I tried placing things like "Message('Hello') on the key-edit form level trigger and this message is displayed...except for the editor. So, this means that it's supposedly executing this trigger...but why is the editor not showing? I also compared the properties of the items showing the editor and the ones that don't and they are basically the same (except for the database item, x pos, y pos, etc).
    Key-edit contains the following code..."edit_textitem(150,100,300,150);"
    I tried changing the coordinates or placed a key-edit trigger on the block level, the results are still the same. I hope someone with the same experience or who knows something about this can help me. Thanks!

    StevoD24 wrote:
    Changing that setting doesn't make a difference either way.
    It should be OFF.
    If the text is not wrapping, and and the box ix not checked, then the only other possibility is that Ignore Text Wrap is on.
    Can you post some screen shots? maybe put a sample page out on a server someplace so we can look at it?

  • FRM-40106 - No navigable items in destination block

    Hello,
    i have a list populated with records from a COUNTY table, and when i select a county, it displays all the cities from that county.. also i have that block named COUNTY, with 3 hidden items on the form (id, code, name). when i select something from that list, i got FRM-40106. and this is when the id item COUNTY block is hidden, if Visible=YES, then when i select a county from the list, it points automatically to that id field. how can i hide that field, but also being able to select a county and display the corresponding cities ?
    Thanks

    Roger,
    You need to be careful when having dynamic lists like this. (se the forms help for populate list).
    You need to re-populate the list of cities based on the value selected for the county
    Your record group for cities would have a where clause like 'where county_id = :block.county'
    use the when-list chaged trigger on the county item to clear your city item, and re-create and re-populate the list assocated with the city item
    Hope this helps
    Neil

  • Where clause in Data Block

    I'm running Forms 6i client/server.
    I have defined a where clause in the Property Palette for a Data Block.
    What I like to do is to extend the where clause with a subquery, but
    how can this be done? I mean, should I put the code in a trigger, which trigger?
    Regards
    Roar

    simple where clause with sub_query
    My block has name is dc_gmod. In the where pallete I put the text (and the all is work good!!!):
    exists
    select 1 from ttt.xxxxx_table v
    where (dc_gmod.cd_gmod = v.cd_gmod)
    and
    (instr(:fst.tmp_nm,cd_place,1) > 0
    or
    cd_place IN
    (select U_UNIT from ttt.xxxxxxxxx_tabe
    where RG_U = :QA.RG_UNIT_RUN
    AND SID = :QA.SID
    AND SERIAL# = :QA.SERIAL
    1.The dc_gmod.cd_gmod - is full name my block_name and item_name.
    2. The ttt.xxxxx_table is full name of my table what is source for block dc_gmod
    3. The cd_place is ITEM of BLOCK dc_gmod

  • How can I pass multiple condition in where clause with the join table?

    Hi:
    I need to collect several inputs at run time, and query the record according to the input.
    How can I pass multiple conditions in where clause with the join table?
    Thanks in advance for any help.
    Regards,
    TD

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • How to pass the parameter in the where clause of the select statement

    Hi All,
    Iam getting one of the value from the Input otd and using this value i need to query one of the tables in oracle database and selected the table using the oracle eway otd like shown below .
    otdRISKBLOCK_1.getRISKBLOCK().select() .
    where clause in side the select takes a string parameter as Iam getting the string parameter from the input otd and passing this to where clause by creating a string literal after deployment it is giving an error saying "ORA-00920: invalid relational operator".
    can any one throw some input on this .
    Thanks in Advance
    Srikanth

    You will see this error if the search condition was entered with an invalid or missing relational operator.
    You need to include a valid relational operator such as
      =, !=, ^=, <>, >, <, >=, <=, ALL, ANY, [NOT] BETWEEN, EXISTS, [NOT] IN, IS [NOT] NULL, or [NOT] LIKE in the condition. in the sql statement.
    Can you throw some more light on how are you designing your project?

  • Block the Material at Item level in Sales Order automatically for delivery

    Hi!
    My business scenario needs a material to be Ckecked for Inspection after raising the Sales Order by thirdparty person. So, I need to block that particular material at Item level automatically for delivery and rest of the line items can get delivered. I can do this by selecting the reason for Block at Item level manually, but I want the system to get detemine this block. And one more thing is that there is NO Quality Management module for this. So, let me know what I need to configure for this effect.   Thank you.....

    hi,
    pl check the user exit " userexit_save_document_prepare" or "userexit_save_document".
    Take the help of your abaper to see if the logic written here can affect the item level block in the sales order for inspection. Create new reason for the item level block and have it triggered with this exit. Instead of hard coding which might require regular intervention of abaper for code changes for the business to be able to manage it, maintain a master data in the material master against some field with a key.
    now use that key to identify if these materials require to be blocked at the sales order level for inspection. To release this item again the user has to go in VA02 mode to release the block. Let this be done after the inspection of that material.
    regards
    sadhu kishore

  • How to display the count of a list item in Sharepoint Designer?

    How to display the count of a list item in Sharepoint Designer? please reply with the proper code line to add for this.

    Hello,
    What version of sharepoint you are using? Try below approach:
    http://sharepointlogics.com/2010/03/total-count-of-items-in-list-in.html
    Hope it could help
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer
    Please feel free to unmark answer if does not resolves your problem.

  • How to change the Height of item....!!!! in multi record block

    Here is the problem I want to change one item height in multiple records block..
    I tried to do the following
    set_item_instance_property(:system.mouse_item,:system.current_record,height,50);
    But this didn't work as the property for height couldn't be used with this built in..
    Can any one tell me any other suggestion to move around
    Thanks and best regares

    If you just have two sizes to display - e.g. normally the item is 1 line high but in the current item you want to show more information and want to make it say 2 lines high, then you can use a Mirror item to do this.
    Create another item in the block - set the Synchronize With Item property to the base item you want to "Resize".
    Set the Records Displayed property to 1 for this extra field.
    Put this field on a stacked canvas that is just big enough to hold it.
    The in your When-New-Record Instance trigger you can pop the stacked canvas up over the normal version of the field.
    That should do the trick.

Maybe you are looking for

  • How do I use jstl  to insert  links that passes sql info?

    Hi all, I'm using JSTL with sql and I want to create a link for every row so that the link would also contain the item in the first column of every row. But I keep getting stuck at saving the value. This is what I've tried: <c:set var="myName" value=

  • MAKING A FIELD MANDATORY IN SELECTION SCREEN

    HOW TO MAKE THE SELECTION SCREEN FIELDS MANDATORY USING LOOP AT SCREEN STATEMENT.I TRIED USING IT WITH AT SELECTION SCREEN EVENT.BUT IT WAS NOT WORKING.SO CAN ANY OF U PROVIDE SAMPLE CODE FOR THIS. THANKS.

  • Re: Creating document types

    Hello, Can you post a snipet from the code that you are using? Regards, Shane In article <R_ZIc.1560$[email protected]>, [email protected] says... > I've got a GW 5.x postoffice in a lab enviroment for testing. One thing I > have to do is create some

  • Upgrade to SAP ERP changes in XI - Release Transfer, Metadata, SLD, Idoc's

    We are upgrading from SAP R/3 40B to SAP ECC 6.0 I would like to know what steps I need to do in XI to ensure that none of the current maps are broken. Can you point me to documentation, links that might help determine the required steps I need to ta

  • DelayQueue: peek() behaviour as described in javadoc?

    I am not sure if I got the peek() Method wrong in java.util.concurrent.DelayQueue class. My problem: I have a class 'TimedJob' implementing 'Delayed' which acts as item of my DelayQueue. Each TimedJob gets a millisecond value defining the time which