Countif records match in another Creator app
I have a series of three reports and need to count now many records in each match a central list. Two of the reports are in AppOne - one is in AppTwo
The first part is ok - this code will count every document and reference that match the ID
- for each varRecord in Services[ID != 0]
- {
- varRecord.service_document_count=Documents[documents_lookupservices == varRecord.ID].count(documents_lookupservices);
- varRecord.service_references_count=References[references_lookupservices == varRecord.ID].count(references_lookupservices);
- }
I also wish to do the same with another app. I have created a function to return a list of all of the ServiceIDs from this app.
The Service field is a lookup from AppOne so I know that the IDs will match across the apps
- list AppTwo.GetProcessCount()
- {
- varAppTwoRecords = Process[ID != 0].ID.getAll();
- return varAppTwoRecords;
- }
At the moment I only have 5 records in the AppTwo.Process report so this function gives me the result of 5 IDs - you will see that one is duplicated which means there are 2 Processes for that Service
72570000002497856
72570000003234200
72570000003390602
72570000003234200
72570000003488126
How do I add this to the above code ?
I know the below is incorrect ... but it's essentially what I am trying to do.
varRecord.service_process_count=AppTwo[Process[process_lookupservices == varRecord.ID]].count(process_lookupservices);