Counting Items
I am trying to develop an Automator workflow for Mail. I am successful in getting the mail messages that meet a certain criteria. But the problem is getting a COUNT of them.
Is there any way for Automator to COUNT the number of items passed into a step, store the count
into a variable, and then use it later on in a loop?
Many thanks for any guidance on this.
The following Run AppleScript action counts the number of input items from the previous action and returns the result:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters}
return (count input)
end run
</pre>
Similar Messages
-
Greetings!
First, thank you for looking at my question. I am trying to count the number of items that = "True" in DataSet2 and display them in the "Week" column in a table who is pointed to DataSet1.
I have a simple table that is set up something like this:
CDC Week |
[Week Number] from DataSet1
| Total
Count of Some Item |
[CountSomeField] from DataSet1
| [ Total of Row]
Count of Another Item |
[CountOfTrueItems] from DataSet2
| [Total of Row]
With the expected results:
CDC Week |
25
| 26 |
27 |
(n/a)
Count of Some Item |
10 |
20 |
30 |
(Expected 60 but not working yet)
Count of Another Item |
5 |
10 |
15 |
(Expected 30 but not working yet)
Instead I get:
CDC Week |
25 |
26 |
27 |
(n/a)
Count of Some Item |
10 |
20 |
30 |
(Not working yet)
Count of Another Item |
30 |
30 |
30 |
(Not working yet)
DataSet1 has a few columns including a "Week" column. DataSet2 has two columns, "WEEK" and "POS".
I need to count items when POS = "TRUE" in DataSet2 and group them on the "Week" column.
My current expression is =SUM(IIF(Fields!Pos_.Value = "True", 1, 0), "DataSet2")
And while this returns a value, it does not count (or sum) by each week. I am missing something...
Thank you for any assistance!
p.s. Sorry My html skills are not shining with the table formatting :(Hi,
Would you please provide some screenshots?
Work hard, play harder! -
Manually schedulled cycle count items are not coming in cycle count listing
We had scheduled some items for manual cycle counting for particular date. But those are not getting generated in cycle count listing report or not avialble for counting.
Checkpoints done: 1. Items are cycle count enabled
2. Those items are avialable in that Cycle count Name
3. Onhand is avialbe for those items in particular subinventory
4. Cycle count scope is specific to Subinventory and that sub inv is included in the list
Can anyone give some thoughts why those manually schedulelled items are still not getting in cycle count listing report?
Thanks in Advance
AvinashHi Avinash,
Can you please let us know, are you using the CC with ABC analysis?
Thanks
NS -
I want to count the items monthly wise those are using first time in that year (APR - MAR).
For example if we use a item for PO in the month of April, May, June, .... the item should count in the month of April only
I developed one query for that
but it takes more time to run
SELECT nvl(po.no,0) New_Items,to_char(trunc(mths.dt,'MM') , 'MON-YYYY') Items_Month from
(select count( distinct a.item_id) no ,to_char(trunc(a.transaction_date,'MM'),'MM-YYYY') Monthly from
(select rsl.item_id, rt.transaction_date
from rcv_transactions rt
, rcv_shipment_lines rsl
where rt.shipment_line_id=rsl.shipment_line_id
and rt.transaction_type='RECEIVE'
and rt.transaction_date between nvl(:P_FROM_DATE, rt.transaction_date) and nvl(:P_TO_DATE, rt.transaction_date)
and rsl.item_id not in (select rsl.item_id
from rcv_transactions rt
, rcv_shipment_lines rsl
where rt.shipment_line_id=rsl.shipment_line_id
and rt.transaction_type='RECEIVE'
and rt.transaction_date < nvl(:P_FROM_DATE, rt.transaction_date))) a
group by to_char(trunc(a.transaction_date,'MM'),'MM-YYYY')) PO
, (SELECT add_months('01-DEC-2006', lvl) dt
FROM (select level lvl
from dual
connect by level < 1000)) mths
WHERE to_char(trunc(mths.dt,'MM'),'MM-YYYY')=po.Monthly(+)
and mths.dt between :P_FROM_DATE and :P_TO_DATE
order by mths.dt
please help to solve this issue
AdinaSomething like this?
select count(distinct item_id) new_items,
the_month
from (select item_id,
to_char(the_date,'yyyymm') the_month
first_value(to_char(the_date,'yyyymm')) over (partition by item_id order by the_date nulls last) first_month
from your_table -- or < your query >
where the_month = first_month
group by the_month*** not tested ***
Regards
Etbin -
Is it possible to count all the items (document, URL, zip file, etc) of a Content area? Is there any standard statistic or tool to do this?
thanks!
paolohi paolo,
one way is using the content management view wwsbr_all_items.
http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/plsql/doc/pldoc_9026/wwsbr_api.html
regards,
christian -
Hello,
I need a clean way to count the items in an array. I can sort them using :
int []x=new int[150]; I'm using Math.random%10 to get intergers from 0-9;
public static void countItem() // sort items in the array
int min, temp;
for (int i = 0; i < x.length-1; i++)
min = i;
for (int scan = i+1; scan < x.length; scan++)
if (x[scan] < x[min])
min = scan;
// Swap the values
temp = x[min];
x[min] = x;
x[i] = temp;
but once they are sorted I am baffeled on a clean way to count how many of each item are listed.
0001122222222333444444 etc up to 9.
Thanksbut once they are sorted I am baffeled on a clean way to count how many of each item are listed.
0001122222222333444444 etc up to 9I think you're going about this the wrong way. First count, then you've implicitly sorted them (counting sort). public class CountingSort
public static void main(String[] args)
int[] arr = {4, 5, 1, 3, 3, 3, 7};
countSort(arr);
for (int i = 0; i < arr.length; i++)
System.out.print(arr[i] + " ");
static void countSort(int[] arr)
// Assume all elements of arr are in range 0..9
// initialise buckets to an array of zeroes - don't rely on this except in Java
int[] buckets = new int[10];
for (int i = 0; i < arr.length; i++)
buckets[arr]++;
// Now reconstruct the array in sorted order
// k is the next element in the array to fill in
int k = 0;
for (int i = 0; i < arr.length; i++)
while (buckets[i]-- > 0)
arr[k++] = i; -
Marking counted items in an Inventory Document
Hi experts!
When I start a new store in my system, when I do the cycle count in MICN, the transaction proposes to count all articles in the store, since they have never been counted before. This is generating a lot of problems to my team.
Is there any way to mark the articles that have already been counted and the last count date? So that the MICN will only propose those articles that have to be counted.
Thank you very much.Welcome to Apple Discussions
I get it. When you select an item on a summary page, the item is marked a different color, ie "read, after you select the item, and then return to the summary page.
The short of it - Safari is not designed to remember site activity from session to session. As long as you keep Safari active, the site reflects what is read (holds true for any site with live links). However, when you quit the application, Safari does not retain this information. Next time you open Safari and access the site, it's like you are starting all over again.
Perhaps someone else in this forum can address whether you can modify Safari to suit your needs. IMO you can't. -
Hi all,
I have the following problem:
I have a table containing document data, each document has a doc_id as a unique indentifier. Each document is assigned to a project via the column proj_code:
CREATE TABLE DOCS
DOC_ID NUMBER(22) NULL,
PROJ_CODE VARCHAR2(10) NULL,
In another table I have the project codes, project names and customer names. Each project has one customer assigned to it, there can be multiple projects per customer. Project code and project name are in a 1:1 relationship:
CREATE TABLE PROJECT
PROJ_CODE NUMBER(22) NULL,
CUST_NAME VARCHAR2(30) NULL,
PROJ_NAME VARCHAR2(30) NULL
What I'm trying to do now is construct a view, that'll give me project code, project name, customer name and the count of documents, that have this project code. here's what I've come up with so far:
select proj_code, count(doc_id) from
(select project.proj_code, doc_id from project, docs where project.proj_code = docs.proj_code) group by proj_code;
This has two problems: it does not show the projects, that have no documents. Also, if I add the other columns to the select clause, I get this error:
ORA-00979: not a GROUP BY expression [SQL State=42000, DB Errorcode=979]
Ideas, anyone?
Thanks,
Mike(+) is an Oracle specific way of signifying outer
joins. Since 9i Oracle has supported the ANSI
constructs LEFT OUTER and RIGHT OUTER, it's just that
old dogs such as myself tend to use (+) out of sheer
force of habit.I stick with the old syntax as to me left and right are totally confusing concepts when it comes to sets, and the new syntax is as verbose as anything you'd expect to be designed by a committee.
The big advanatge of the ANSI
version is that it also has FULL OUTER, which was
rather inconvenient to do in the earlier versions of
Oracle.Agreed. Though I've only ever written precisely one full outer join, and seen one other. -
After placing a number using the count tool I was unable to move the number. I hovered over the number and the cursor changed but when I attempted to drag the number nothing occured and the cursor changed back to a "+" cursor. Thank you
Hardware Overview:
Model Name: MacBook
Model Identifier: MacBook5,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache: 3 MB
Memory: 8 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MB51.007D.B03
SMC Version (system): 1.40f2
Sudden Motion Sensor:
State: Enabled
NVIDIA GeForce 9400M:
Chipset Model: NVIDIA GeForce 9400M
Type: GPU
Bus: PCI
VRAM (Total): 256 MB
Vendor: NVIDIA (0x10de)
Device ID: 0x0863
Revision ID: 0x00b1
ROM Revision: 3385
Displays:
Color LCD:
Resolution: 1280 x 800
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Built-In: Yes
System Software Overview:
System Version: Mac OS X 10.7.3 (11D50)
Kernel Version: Darwin 11.3.0
Boot Mode: Normal
64-bit Kernel and Extensions: YesI found a way to make it work. You drag then click somewhere else. Not very intuitive but it works.
-
Dso updating item count to cube
Hello experts.
I am counting item in transformation from data source to DSO (key fields - order no and item no).
Result = 1`.
In DSO, count works fine.
Now, I am updating DSO to a summary cube.
What transformation routine I need to write, so that an item only count once and not aggregated when same item and order comes in multiple times.
Is this routine correct -
if source_fields-recordmode = 'R' or
source_fields-recordmode = ' ' .
result = '-1'.
else.
result =1.
endif.Ramesh,
No need to write any code while mapping from DSO to CUBE.
Just map, counter(one-to-one) from DSO to CUBE.
Change DTP settings to from change log. Change log takes care of new, changed or canceled records.
Hope it Helps
Srini -
WM Inventory Document Cleared with Item not counted
Hi.
I have a strange situation. There is a WM Inventory Document with status Cleared, but there is a Item with status Not Counted.
The differences ware already cleared via LI21/LI20 but due the Not Counted Item, the quant is still blocked by inventory.
Do you have some idea how can I count/clear this item and release the quant?
Thanks in advance.M7706 is a hard coded error message, you cannot control it via message attributes.
What you can do is to do a re-count via transaction MI11 with reference to this inventory document. In this case you will be able to add new items, however, you have to enter the counted amounts for the existing items again.
But in my opoinion it's easier to create a new PID as suggested by Jurgen. -
Hi guys
If item is lot controlled, cycle count entry form obliges user to enter lot number. When the number of lots for each item is many, user has to count items per lot and then enter the results per item per lot. It's a very time consuming process.
Does anybody have any suggestion to count items only per item code(even if they are lot-controlled) and only in case of discrepancy enter the lot number?
Any idea might help.
Thanksthanks a lot, I think this will work very well...
"No, I want it to be NOT ENABLED, but I want it to look like ENABLE. "
Now that's a cruel trick to play on the users :)
Seriously, I think you will have to have the item enabled, but with insert/update/query disallowed and keyboard navigable off. You may also need a 'PRE_TEXT_ITEM' containing 'RAISE FORM_TRIGGER_FAILURE'
As I understand it, windows puts it's own colour scheme into play for disabled items. -
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 -
Can photoshop automatically count similar shaped items in an image
I'm wanting to automatically count items of similar shape and color in an image . The items are the round ends of wooden dowels in a stack . Each dowel is 2 1/4 inches in diameter . There could be 1400 of these in a stack .it is very time consuming to count manually
Thanks
joearenaPS can't and, as far as i know, there's no plug in... but strangely enough i believe there is a website where you can post an image and it'll return the font or at least a close approximation... do a Google search and check...
-
Hi,
The 'Cycle Count Items' form is blank even after compliing and have seven items against cycle account name'Warehouse 2011' Any ideas where we are going wrong?
Many thanksAny item has to be counted once a year. the fiscal year is controlling the inventory period.
if you have a new material that you receive the first time at the end of the year, then you have to count it in this year the first time, and the next time after your defined number of days.
Thats system design, you cant change it.
Maybe you are looking for
-
My page works in Safari, but not in Internet Explorer
I am working on a new site, www.icu-usapro.com. I am working on a mac and have the page looking and working fine in safari, but when i view it in Internet Explorer, the menu at the top moves and the links do not work. I imported the top from firework
-
First question - I have Acrobat 9 on my desktop and the license seems to have been messed up. I tried to download and fis but I asked me for a disk. I don't have any idea where the "disk" is. Can I get the license update without that disk? Second
-
Query related to UPN Suffix in Hierarchical domain architecture in Active Directory deployment
This is regarding a query related to UPN Suffix in Hierarchical domain architecture in Active Directory deployment. We use LDAP query (filter uPNSuffixes=* for the parent domain DN) to retrieve the upn suffixes configured in the AD Domain. This retur
-
Hardware requirement for R12 up-grade
Dear All, We are going to upgrade from EBS 11.5.9 to R12 on Linux environment. Currently we are working on hardware requirement for R12. 1-How can we calculate sizing requirement in context of R12. 2-CPU capacity including RAM required Or any other b
-
Preview bitmaps on win-explorer-doubleclick
Hi All, on Win7 64 I could with CS5 associate all popular bitmap formats with Bridge. That way when double-clicking an image in windows-explorer I got a preview with Bridge. If so desired I could then fully open that file from the Bridge-Context Menu